Use startwith to simplify =* matching.
authorZac Medico <zmedico@gentoo.org>
Wed, 10 Jan 2007 11:41:09 +0000 (11:41 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 10 Jan 2007 11:41:09 +0000 (11:41 -0000)
svn path=/main/trunk/; revision=5521

pym/portage_dep.py

index c27d4307e004ca13c4ebcaa11da869cf4f491662..3d0e160b07031e4d584ec3aa637b536cab8f8013 100644 (file)
@@ -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