summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-02-02 18:03:05 -0800
committerZac Medico <zmedico@gentoo.org>2011-02-02 18:03:05 -0800
commitb59e1c4ee8b6035cc125afae3a16619f9e3199ee (patch)
tree6e4985295a88004d58853d9c10a9516d0405bcc4
parentebc2fafe4a7261ba6e97c3f0ec134b7ca542d1d7 (diff)
downloadportage-b59e1c4ee8b6035cc125afae3a16619f9e3199ee.tar.gz
portage-b59e1c4ee8b6035cc125afae3a16619f9e3199ee.tar.bz2
portage-b59e1c4ee8b6035cc125afae3a16619f9e3199ee.zip
REQUIRED_USE: no autounmask, so skip backtracking
-rw-r--r--pym/_emerge/depgraph.py13
1 files changed, 9 insertions, 4 deletions
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