Bug #293614 - When the backtracking limit is reached and there is a SLOT
authorZac Medico <zmedico@gentoo.org>
Wed, 25 Nov 2009 22:32:16 +0000 (22:32 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 25 Nov 2009 22:32:16 +0000 (22:32 -0000)
conflict to display, hint that a larger --backtrack value might solve
the conflict automatically. (trunk r14875)

svn path=/main/branches/2.1.7/; revision=14888

pym/_emerge/depgraph.py

index d779b9cc53eb82c21b1167aef39314f557486760..684775296a0996f5bda23b81dde4c123898cf9a5 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))