summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Mauch <genone@gentoo.org>2007-01-10 09:40:43 +0000
committerMarius Mauch <genone@gentoo.org>2007-01-10 09:40:43 +0000
commit4ef95138481071114b2155b92ae8886786aac29a (patch)
treeb75b700e207edd8d9a7d8154a2c8010498a4243e /pym/portage_dep.py
parentDocumenting the loop a bit (diff)
downloadportage-multirepo-4ef95138481071114b2155b92ae8886786aac29a.tar.gz
portage-multirepo-4ef95138481071114b2155b92ae8886786aac29a.tar.bz2
portage-multirepo-4ef95138481071114b2155b92ae8886786aac29a.zip
=* operator sucks
svn path=/main/trunk/; revision=5516
Diffstat (limited to 'pym/portage_dep.py')
-rw-r--r--pym/portage_dep.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/pym/portage_dep.py b/pym/portage_dep.py
index 432a7d44..0baeab08 100644
--- a/pym/portage_dep.py
+++ b/pym/portage_dep.py
@@ -584,17 +584,14 @@ def match_from_list(mydep, candidate_list):
elif operator == "=*": # glob match
for x in candidate_list:
+ # XXX: Nasty special casing for leading zeros
+ # Required as =* is a literal prefix match, so can't
+ # use vercmp
+ xs = catpkgsplit(x)
+ xcpv = xs[0]+"/"+xs[1]+"-"+xs[2].lstrip("0")
xcpv = x[:min(len(x), len(mycpv))]
if xcpv == mycpv:
mylist.append(x)
- else:
- # xcpv may not be a proper cpv, but cpvequal needs it to be
- # reducing it should always work, in worst case it stops at
- # the first digit. Might cause a minor peformance hit though.
- while not isspecific(xcpv):
- xcpv = xcpv[:-1]
- if cpvequal(xcpv, mycpv):
- mylist.append(x)
elif operator == "~": # version, any revision, match
for x in candidate_list: