From ebecb93645d1d742e47792c40f4f79dff40362e5 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 19 Mar 2013 11:47:31 -0700 Subject: [PATCH] autounmask: remove faulty reset_pkg() function This function did not work as intended, due to the pkg variable being updated in the wrong scope. --- pym/_emerge/depgraph.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 326dd68dd..a17398c92 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -4342,15 +4342,12 @@ class depgraph(object): default_selection = (pkg, existing) - def reset_pkg(pkg): + if self._dynamic_config._autounmask is True: if pkg is not None and \ pkg.installed and \ not self._want_installed_pkg(pkg): pkg = None - if self._dynamic_config._autounmask is True: - reset_pkg(pkg) - # Temporarily reset _need_restart state, in order to # avoid interference as reported in bug #459832. earlier_need_restart = self._dynamic_config._need_restart @@ -4365,7 +4362,10 @@ class depgraph(object): root, atom, onlydeps=onlydeps, autounmask_level=autounmask_level) - reset_pkg(pkg) + if pkg is not None and \ + pkg.installed and \ + not self._want_installed_pkg(pkg): + pkg = None if self._dynamic_config._need_restart: return None, None -- 2.26.2