discardBlocker: fix bug in slot match code
authorZac Medico <zmedico@gentoo.org>
Thu, 26 May 2011 12:22:18 +0000 (05:22 -0700)
committerZac Medico <zmedico@gentoo.org>
Thu, 26 May 2011 12:25:07 +0000 (05:25 -0700)
pym/_emerge/BlockerDB.py

index d094a23dabba972798d33131bfb21cc7f4d3dfa5..bd85e6f4288f4a94e3445a2919f76c035b09af3d 100644 (file)
@@ -117,7 +117,8 @@ class BlockerDB(object):
                """Discard a package from the list of potential blockers.
                This will match any package(s) with identical cpv or cp:slot."""
                for cpv_match in self._fake_vartree.dbapi.match_pkgs("=%s" % (pkg.cpv,)):
-                       self._fake_vartree.cpv_discard(cpv_match)
+                       if cpv_match.cp == pkg.cp:
+                               self._fake_vartree.cpv_discard(cpv_match)
                for slot_match in self._fake_vartree.dbapi.match_pkgs(pkg.slot_atom):
                        if slot_match.cp == pkg.cp:
-                               self._fake_vartree.cpv_discard(pkg)
+                               self._fake_vartree.cpv_discard(slot_match)