summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-01-10 11:25:06 +0000
committerZac Medico <zmedico@gentoo.org>2007-01-10 11:25:06 +0000
commit5824aa69a7e701e092051302e7f037f15371a7f2 (patch)
tree2f589182b540030f6de976b2b54c782904290583
parente12b63e53cd6179d25f27eceb82cfe7a6ba6b7e0 (diff)
downloadportage-5824aa69a7e701e092051302e7f037f15371a7f2.tar.gz
portage-5824aa69a7e701e092051302e7f037f15371a7f2.tar.bz2
portage-5824aa69a7e701e092051302e7f037f15371a7f2.zip
Minor fixes for the =* operator (I hope we're done now :).
svn path=/main/trunk/; revision=5520
-rw-r--r--pym/portage_dep.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/pym/portage_dep.py b/pym/portage_dep.py
index c488aa948..c27d4307e 100644
--- a/pym/portage_dep.py
+++ b/pym/portage_dep.py
@@ -588,12 +588,15 @@ def match_from_list(mydep, candidate_list):
# use vercmp
mysplit = catpkgsplit(mycpv)
myver = mysplit[2].lstrip("0")
- if not myver[0].isdigit()
- mver = "0"+myver
+ if not myver or not myver[0].isdigit():
+ myver = "0"+myver
mycpv = mysplit[0]+"/"+mysplit[1]+"-"+myver
for x in candidate_list:
xs = catpkgsplit(x)
- xcpv = xs[0]+"/"+xs[1]+"-"+xs[2].lstrip("0")
+ myver = xs[2].lstrip("0")
+ if not myver or not myver[0].isdigit():
+ myver = "0"+myver
+ xcpv = xs[0]+"/"+xs[1]+"-"+myver
xcpv = x[:min(len(x), len(mycpv))]
if xcpv == mycpv:
mylist.append(x)