Bug #293614 - When the backtracking limit is reached and there is a SLOT
authorZac Medico <zmedico@gentoo.org>
Mon, 23 Nov 2009 21:34:51 +0000 (21:34 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 23 Nov 2009 21:34:51 +0000 (21:34 -0000)
conflict to display, hint that a larger --backtrack value might solve
the conflict automatically.

svn path=/main/trunk/; revision=14875

pym/_emerge/depgraph.py

index 966e27be4eee9c2395c384bd89ac4772195b5913..dff0d9a7902cdb1b74b72eb3e6f97554869f2682 100644 (file)
@@ -538,6 +538,14 @@ class depgraph(object):
                msg.append("satisfy simultaneously.  If such a conflict exists in ")
                msg.append("the dependencies of two different packages, then those ")
                msg.append("packages can not be installed simultaneously.")
+               backtrack_opt = self._frozen_config.myopts.get('--backtrack')
+               if not self._dynamic_config._allow_backtracking and \
+                       (backtrack_opt is None or \
+                       (backtrack_opt > 0 and backtrack_opt < 30)):
+                       msg.append(" You may want to try a larger value of the ")
+                       msg.append("--backtrack option, such as --backtrack=30, ")
+                       msg.append("in order to see if that will solve this conflict ")
+                       msg.append("automatically.")
 
                from formatter import AbstractFormatter, DumbWriter
                f = AbstractFormatter(DumbWriter(sys.stderr, maxcol=72))