summaryrefslogtreecommitdiffstats
path: root/pym/portage_dep.py
diff options
context:
space:
mode:
authorMarius Mauch <genone@gentoo.org>2007-01-10 10:02:52 +0000
committerMarius Mauch <genone@gentoo.org>2007-01-10 10:02:52 +0000
commitea4a9b44702d35c7f1e625e93dea5788ab73fbb6 (patch)
tree55d72bb03bd2049e06e639454b15a598976f790d /pym/portage_dep.py
parent2d28882f9a173cca97adb448a6e514d1197cb27c (diff)
downloadportage-ea4a9b44702d35c7f1e625e93dea5788ab73fbb6.tar.gz
portage-ea4a9b44702d35c7f1e625e93dea5788ab73fbb6.tar.bz2
portage-ea4a9b44702d35c7f1e625e93dea5788ab73fbb6.zip
minor performance improvement
svn path=/main/trunk/; revision=5518
Diffstat (limited to 'pym/portage_dep.py')
-rw-r--r--pym/portage_dep.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/pym/portage_dep.py b/pym/portage_dep.py
index edf62522b..95ae4b640 100644
--- a/pym/portage_dep.py
+++ b/pym/portage_dep.py
@@ -583,12 +583,12 @@ def match_from_list(mydep, candidate_list):
mylist = [cpv for cpv in candidate_list if cpvequal(cpv, mycpv)]
elif operator == "=*": # glob match
+ # XXX: Nasty special casing for leading zeros
+ # Required as =* is a literal prefix match, so can't
+ # use vercmp
+ mysplit = catpkgsplit(mycpv)
+ mycpv = mysplit[0]+"/"+mysplit[1]+"-"+mysplit[2].lstrip("0")
for x in candidate_list:
- # XXX: Nasty special casing for leading zeros
- # Required as =* is a literal prefix match, so can't
- # use vercmp
- mysplit = catpkgsplit(mycpv)
- mycpv = mysplit[0]+"/"+mysplit[1]+"-"+mysplit[2].lstrip("0")
xs = catpkgsplit(x)
xcpv = xs[0]+"/"+xs[1]+"-"+xs[2].lstrip("0")
xcpv = x[:min(len(x), len(mycpv))]