From f2d7564b93b4c5387fe82d8a8561b6420c04dee7 Mon Sep 17 00:00:00 2001 From: Sebastian Luther Date: Thu, 21 Oct 2010 22:35:19 +0200 Subject: 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. --- pym/_emerge/depgraph.py | 4 ++-- pym/_emerge/help.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'pym/_emerge') 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() -- cgit v1.2.3-1-g7c22