summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-01-10 11:41:09 +0000
committerZac Medico <zmedico@gentoo.org>2007-01-10 11:41:09 +0000
commit6959744608eb2f2bdb73847108328b3230e9ed8d (patch)
tree048dccc317b902eaf28eab3c9fc24117b9e6f2e0
parent5824aa69a7e701e092051302e7f037f15371a7f2 (diff)
downloadportage-6959744608eb2f2bdb73847108328b3230e9ed8d.tar.gz
portage-6959744608eb2f2bdb73847108328b3230e9ed8d.tar.bz2
portage-6959744608eb2f2bdb73847108328b3230e9ed8d.zip
Use startwith to simplify =* matching.
svn path=/main/trunk/; revision=5521
-rw-r--r--pym/portage_dep.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/pym/portage_dep.py b/pym/portage_dep.py
index c27d4307e..3d0e160b0 100644
--- a/pym/portage_dep.py
+++ b/pym/portage_dep.py
@@ -597,8 +597,7 @@ def match_from_list(mydep, candidate_list):
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:
+ if xcpv.startswith(mycpv):
mylist.append(x)
elif operator == "~": # version, any revision, match