Make match_to_list = behavior consistent with >= and <= for bug #152127.
authorZac Medico <zmedico@gentoo.org>
Wed, 6 Dec 2006 18:37:16 +0000 (18:37 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 6 Dec 2006 18:37:16 +0000 (18:37 -0000)
svn path=/main/trunk/; revision=5175

pym/portage_dep.py

index e5446ef15dcf8b5b65571c999d0e67ca37ce9974..4669682f25cf99a688fa66b8fbc6249a2c95af0e 100644 (file)
@@ -533,8 +533,17 @@ def match_from_list(mydep, candidate_list):
                        mylist.append(x)
 
        elif operator == "=": # Exact match
-               if mycpv in candidate_list:
-                       mylist = [mycpv]
+               mysplit = ["%s/%s" % (cat, pkg), ver, rev]
+               for x in candidate_list:
+                       try:
+                               result = pkgcmp(pkgsplit(x), mysplit)
+                       except SystemExit:
+                               raise
+                       except:
+                               writemsg("\nInvalid package name: %s\n" % x, noiselevel=-1)
+                               raise
+                       if result == 0:
+                               mylist.append(x)
 
        elif operator == "=*": # glob match
                # The old verion ignored _tag suffixes... This one doesn't.