From 445181a538b65ac3d3a1d5560448b166ff9495ea Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 20 May 2010 17:09:06 -0700 Subject: [PATCH] Make the non --update package selection logic avoid installed packages if they are masked. Thanks to Daniel Robbins for reporting. --- pym/_emerge/depgraph.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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)] -- 2.26.2