depclean: account for more masks
authorZac Medico <zmedico@gentoo.org>
Sun, 2 Jan 2011 21:10:42 +0000 (13:10 -0800)
committerZac Medico <zmedico@gentoo.org>
Sun, 2 Jan 2011 23:16:42 +0000 (15:16 -0800)
Account for packages with masks (like KEYWORDS masks) that are usually
ignored in visibility checks for installed packages, in order to
handle cases like bug #350285.

pym/_emerge/depgraph.py

index d570b28fe0e2f14f731ed2146e443df128ef97c7..dab23451e2b4be8efc6edb90eccf2d1d97164be4 100644 (file)
@@ -5361,7 +5361,12 @@ class _dep_check_composite_db(dbapi):
                                arg = None
                        if arg:
                                return False
-               if pkg.installed and not self._depgraph._pkg_visibility_check(pkg):
+               if pkg.installed and \
+                       (pkg.masks or not self._depgraph._pkg_visibility_check(pkg)):
+                       # Account for packages with masks (like KEYWORDS masks)
+                       # that are usually ignored in visibility checks for
+                       # installed packages, in order to handle cases like
+                       # bug #350285.
                        return False
                in_graph = self._depgraph._dynamic_config._slot_pkg_map[
                        self._root].get(pkg.slot_atom)