summaryrefslogtreecommitdiff
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
parentMake the non --update package selection logic avoid installed packages if (diff)
downloadportage-idfetch-445181a538b65ac3d3a1d5560448b166ff9495ea.tar.gz
portage-idfetch-445181a538b65ac3d3a1d5560448b166ff9495ea.tar.bz2
portage-idfetch-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 c102a7a2..d7f42c91 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)]