discardBlocker: fix cpv match so it works
authorZac Medico <zmedico@gentoo.org>
Thu, 26 May 2011 12:00:01 +0000 (05:00 -0700)
committerZac Medico <zmedico@gentoo.org>
Thu, 26 May 2011 12:00:01 +0000 (05:00 -0700)
pym/_emerge/BlockerDB.py

index 0021f2339dab46faac048397c1618ebf6fc04468..dc0f9134e4b838686cf44d49135142d282606ec1 100644 (file)
@@ -114,8 +114,10 @@ class BlockerDB(object):
                return blocking_pkgs
 
        def discardBlocker(self, pkg):
-               """Discard a package from the list of potential blockers."""
-               self._fake_vartree.cpv_discard(pkg)
+               """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)
                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)