summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-08-06 22:04:25 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-06 22:04:25 -0700
commiteabb5944a6e4f540b3c1a74485e15cd42789ff94 (patch)
tree9d5d6362bbcf18ab229e5abd917a77577ab6d9d8
parent03e6dd20e5c1a30540e1a17eabcd038a89254730 (diff)
downloadportage-eabb5944a6e4f540b3c1a74485e15cd42789ff94.tar.gz
portage-eabb5944a6e4f540b3c1a74485e15cd42789ff94.tar.bz2
portage-eabb5944a6e4f540b3c1a74485e15cd42789ff94.zip
Ensure that _select_pkg_highest_available_imp() falls back to an
installed package if the autounmask path fails to select something.
-rw-r--r--pym/_emerge/depgraph.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index c05679561..e0e215cf2 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -2530,6 +2530,8 @@ class depgraph(object):
def _select_pkg_highest_available_imp(self, root, atom, onlydeps=False):
pkg, existing = self._wrapped_select_pkg_highest_available_imp(root, atom, onlydeps=onlydeps)
+ default_selection = (pkg, existing)
+
if self._dynamic_config._autounmask is True:
if pkg is not None and \
pkg.installed and \
@@ -2556,6 +2558,11 @@ class depgraph(object):
if self._dynamic_config._need_restart:
return None, None
+ if pkg is None:
+ # This ensures that we can fall back to an installed package
+ # that may have been rejected in the autounmask path above.
+ return default_selection
+
return pkg, existing
def _pkg_visibility_check(self, pkg, allow_unstable_keywords=False):