diff options
author | Zac Medico <zmedico@gentoo.org> | 2013-03-01 16:57:56 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2013-03-01 16:57:56 -0800 |
commit | dd75365b27460fc5ceea697bfbb7cb2c2ddcc1cf (patch) | |
tree | 6b82feb62cef708c6f25ac15f587bff39d86470f | |
parent | portage(5): document multiple parents in the parent file (diff) | |
download | portage-dd75365b27460fc5ceea697bfbb7cb2c2ddcc1cf.tar.gz portage-dd75365b27460fc5ceea697bfbb7cb2c2ddcc1cf.tar.bz2 portage-dd75365b27460fc5ceea697bfbb7cb2c2ddcc1cf.zip |
Fix autounmask/sub-slot interference, bug #459832
-rw-r--r-- | pym/_emerge/depgraph.py | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 6f7b673db..7e51d03c5 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -3058,6 +3058,10 @@ class depgraph(object): self._dynamic_config._need_restart = True return False, myfavorites + if self.need_restart(): + # want_restart_for_use_change triggers this + return False, myfavorites + # Any failures except those due to autounmask *alone* should return # before this point, since the success_without_autounmask flag that's # set below is reserved for cases where there are *zero* other @@ -4274,19 +4278,27 @@ class depgraph(object): if self._dynamic_config._autounmask is True: reset_pkg(pkg) - for autounmask_level in self._autounmask_levels(): - if pkg is not None: - break + # Temporarily reset _need_restart state, in order to + # avoid interference as reported in bug #459832. + earlier_need_restart = self._dynamic_config._need_restart + self._dynamic_config._need_restart = False + try: + for autounmask_level in self._autounmask_levels(): + if pkg is not None: + break - pkg, existing = \ - self._wrapped_select_pkg_highest_available_imp( - root, atom, onlydeps=onlydeps, - autounmask_level=autounmask_level) + pkg, existing = \ + self._wrapped_select_pkg_highest_available_imp( + root, atom, onlydeps=onlydeps, + autounmask_level=autounmask_level) - reset_pkg(pkg) - - if self._dynamic_config._need_restart: - return None, None + reset_pkg(pkg) + + if self._dynamic_config._need_restart: + return None, None + finally: + if earlier_need_restart: + self._dynamic_config._need_restart = True if pkg is None: # This ensures that we can fall back to an installed package |