summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-05-20 17:09:06 -0700
committerZac Medico <zmedico@gentoo.org>2010-05-20 17:09:06 -0700
commit445181a538b65ac3d3a1d5560448b166ff9495ea (patch)
tree6523f8887a33495cc1aef3100ecb5b0d314756a0
parentf4097bd5e52c9c546a6092b8ed5c0d918320a054 (diff)
downloadportage-445181a538b65ac3d3a1d5560448b166ff9495ea.tar.gz
portage-445181a538b65ac3d3a1d5560448b166ff9495ea.tar.bz2
portage-445181a538b65ac3d3a1d5560448b166ff9495ea.zip
Make the non --update package selection logic avoid installed packages if
they are masked. Thanks to Daniel Robbins for reporting.
-rw-r--r--pym/_emerge/depgraph.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index c102a7a2d..d7f42c916 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -2719,7 +2719,11 @@ class depgraph(object):
return pkg, existing_node
bestmatch = portage.best(
- [pkg.cpv for pkg in matched_packages])
+ [pkg.cpv for pkg in matched_packages if pkg.visible])
+ if not bestmatch:
+ # all are masked, so ignore visibility
+ bestmatch = portage.best(
+ [pkg.cpv for pkg in matched_packages])
matched_packages = [pkg for pkg in matched_packages \
if portage.dep.cpvequal(pkg.cpv, bestmatch)]