From f2d7564b93b4c5387fe82d8a8561b6420c04dee7 Mon Sep 17 00:00:00 2001 From: Sebastian Luther Date: Thu, 21 Oct 2010 22:35:19 +0200 Subject: [PATCH] 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. --- man/emerge.1 | 2 +- pym/_emerge/depgraph.py | 4 ++-- pym/_emerge/help.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) 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() -- 2.26.2