From: Zac Medico Date: Thu, 3 Feb 2011 02:03:05 +0000 (-0800) Subject: REQUIRED_USE: no autounmask, so skip backtracking X-Git-Tag: v2.2.0_alpha20~28 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b59e1c4ee8b6035cc125afae3a16619f9e3199ee;p=portage.git REQUIRED_USE: no autounmask, so skip backtracking --- diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 2f8037aa0..05ca1872e 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -203,6 +203,9 @@ class _dynamic_depgraph_config(object): self._needed_use_config_changes = backtrack_parameters.needed_use_config_changes self._runtime_pkg_mask = backtrack_parameters.runtime_pkg_mask self._need_restart = False + # For conditions that always require user intervention, such as + # unsatisfied REQUIRED_USE (currently has no autounmask support). + self._skip_restart = False self._backtrack_infos = {} self._autounmask = depgraph._frozen_config.myopts.get('--autounmask', 'n') == True @@ -840,6 +843,7 @@ class depgraph(object): atom = Atom("=" + pkg.cpv) self._dynamic_config._unsatisfied_deps_for_display.append( ((pkg.root, atom), {"myparent":dep.parent})) + self._dynamic_config._skip_restart = True return 0 if not pkg.onlydeps: @@ -1885,7 +1889,7 @@ class depgraph(object): if isinstance(arg, PackageArg): if not self._add_pkg(arg.package, dep) or \ not self._create_graph(): - if not self._dynamic_config._need_restart: + if not self.need_restart(): sys.stderr.write(("\n\n!!! Problem " + \ "resolving dependencies for %s\n") % \ arg.arg) @@ -1948,7 +1952,7 @@ class depgraph(object): # so that later dep_check() calls can use it as feedback # for making more consistent atom selections. if not self._add_pkg(pkg, dep): - if self._dynamic_config._need_restart: + if self.need_restart(): pass elif isinstance(arg, SetArg): writemsg(("\n\n!!! Problem resolving " + \ @@ -5473,8 +5477,9 @@ class depgraph(object): """ def need_restart(self): - return self._dynamic_config._need_restart - + return self._dynamic_config._need_restart and \ + not self._dynamic_config._skip_restart + def success_without_autounmask(self): return self._dynamic_config._success_without_autounmask