From: Sebastian Luther Date: Thu, 21 Oct 2010 20:35:19 +0000 (+0200) Subject: Raise default backtrack limit for bug 337178 X-Git-Tag: v2.2.0_alpha1~20 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f2d7564b93b4c5387fe82d8a8561b6420c04dee7;p=portage.git Raise default backtrack limit for bug 337178 The bug was solved in principle, but other conflicts could lead to all tries being used up too early. The default backtrack limit is changed from 5 to 10. The maximal depth of the backtrack graph is now half of the backtrack limit. --- diff --git a/man/emerge.1 b/man/emerge.1 index ad882b782..21e8db21e 100644 --- a/man/emerge.1 +++ b/man/emerge.1 @@ -297,7 +297,7 @@ LICENSE masks, and package.use settings. .BR \-\-backtrack=COUNT Specifies an integer number of times to backtrack if dependency calculation fails due to a conflict or an -unsatisfied dependency (default: \'5\'). +unsatisfied dependency (default: \'10\'). .TP .BR "\-\-binpkg\-respect\-use < y | n >" Tells emerge to ignore binary packages if their use flags diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index d05272f4f..074b55869 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -5523,8 +5523,8 @@ def backtrack_depgraph(settings, trees, myopts, myparams, def _backtrack_depgraph(settings, trees, myopts, myparams, myaction, myfiles, spinner): - max_retries = myopts.get('--backtrack', 5) - max_depth = myopts.get('--backtrack', 5) + max_retries = myopts.get('--backtrack', 10) + max_depth = max(1, (max_retries + 1) / 2) allow_backtracking = max_retries > 0 backtracker = Backtracker(max_depth) backtracked = 0 diff --git a/pym/_emerge/help.py b/pym/_emerge/help.py index 4533cfba0..97562ab3b 100644 --- a/pym/_emerge/help.py +++ b/pym/_emerge/help.py @@ -314,7 +314,7 @@ def help(myopts, havecolor=1): print(" " + green("--backtrack") + " " + turquoise("COUNT")) desc = "Specifies an integer number of times to backtrack if " + \ "dependency calculation fails due to a conflict or an " + \ - "unsatisfied dependency (default: '5')." + "unsatisfied dependency (default: '10')." for line in wrap(desc, desc_width): print(desc_indent + line) print()