summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)]