depgraph: use Package.masks for installed
authorZac Medico <zmedico@gentoo.org>
Sun, 2 Jan 2011 10:01:43 +0000 (02:01 -0800)
committerZac Medico <zmedico@gentoo.org>
Sun, 2 Jan 2011 10:06:13 +0000 (02:06 -0800)
In some cases we do special masking checks for installed packages,
and Package.masks is a convenient way to do it.

pym/_emerge/depgraph.py

index 71d6746a095faf9f387465b4748124d054fae8c5..d570b28fe0e2f14f731ed2146e443df128ef97c7 100644 (file)
@@ -2581,8 +2581,8 @@ class depgraph(object):
                pkg, existing = ret
                if pkg is not None:
                        settings = pkg.root_config.settings
-                       if self._pkg_visibility_check(pkg) and not (pkg.installed and \
-                               settings._getMissingKeywords(pkg.cpv, pkg.metadata)):
+                       if self._pkg_visibility_check(pkg) and \
+                               not (pkg.installed and pkg.masks):
                                self._dynamic_config._visible_pkgs[pkg.root].cpv_inject(pkg)
                return ret
 
@@ -2903,9 +2903,7 @@ class depgraph(object):
                                                                # If --usepkgonly is enabled, assume that
                                                                # the ebuild status should be ignored.
                                                                if not use_ebuild_visibility and usepkgonly:
-                                                                       if installed and \
-                                                                               pkgsettings._getMissingKeywords(
-                                                                               pkg.cpv, pkg.metadata):
+                                                                       if pkg.installed and pkg.masks:
                                                                                continue
                                                                else:
                                                                        try: