From: Zac Medico Date: Tue, 19 Mar 2013 18:47:31 +0000 (-0700) Subject: autounmask: remove faulty reset_pkg() function X-Git-Tag: v2.2.0_alpha167~7 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ebecb93645d1d742e47792c40f4f79dff40362e5;p=portage.git autounmask: remove faulty reset_pkg() function This function did not work as intended, due to the pkg variable being updated in the wrong scope. --- 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