summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-08-26 19:07:09 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-26 19:07:09 -0700
commitedc8f67481f1f805e311e215e5c8575aa076aba0 (patch)
tree88d44f9f29c3cbf47d2eaa24608ec49059ac0272
parent358f594427dfe3698e0410fe33edcb4e8b245b23 (diff)
downloadportage-edc8f67481f1f805e311e215e5c8575aa076aba0.tar.gz
portage-edc8f67481f1f805e311e215e5c8575aa076aba0.tar.bz2
portage-edc8f67481f1f805e311e215e5c8575aa076aba0.zip
Use Package.visible to simplify visibility checks for installed
packages, no that it accounts for invalid metadata.
-rw-r--r--pym/_emerge/depgraph.py12
1 files changed, 1 insertions, 11 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index effb2e541..69ba8b2cc 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -2616,17 +2616,7 @@ class depgraph(object):
# Make --noreplace take precedence over --newuse.
if not pkg.installed and noreplace and \
cpv in vardb.match(atom):
- inst_pkg = self._pkg(pkg.cpv, "installed",
- root_config, installed=True)
- mreasons = None
- if not inst_pkg.invalid:
- mreasons = _get_masking_status(inst_pkg,
- pkgsettings, root_config,
- use=self._pkg_use_enabled(inst_pkg))
- if mreasons and len(mreasons) == 1 and \
- mreasons[0].category == 'KEYWORDS':
- mreasons = None
- if not inst_pkg.invalid and not mreasons:
+ if inst_pkg.visible:
# If the installed version is masked, it may
# be necessary to look at lower versions,
# in case there is a visible downgrade.