Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-portage-dev@l.g.o
Cc: Zac Medico <zmedico@g.o>
Subject: [gentoo-portage-dev] [PATCH 2/2] emerge: default --backtrack=10 (bug 540562)
Date: Wed, 10 May 2017 03:53:34
Message-Id: 20170510035235.25683-2-zmedico@gentoo.org
In Reply to: [gentoo-portage-dev] [PATCH 1/2] emerge: terminate backtracking early for autounmask changes (bug 615680) by Zac Medico
1 Since the default behavior is now for emerge to terminate early for
2 autounmask changes (unless either --autounmask-backtrack=y or
3 --autounmask-continue is enabled), it is much less likely that time
4 will be wasted by fruitless backtracking. Therefore, raise the default
5 backtrack value from 3 to 10, restoring it to the value it had prior
6 to commit 1891388ea0ae0dd58903a71a3adc779731523601 (see bug 536926).
7 This will allow many users to avoid having to manually raise the
8 --backtrack value.
9
10 X-Gentoo-bug: 540562
11 X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=540562
12 ---
13 man/emerge.1 | 2 +-
14 pym/_emerge/depgraph.py | 2 +-
15 2 files changed, 2 insertions(+), 2 deletions(-)
16
17 diff --git a/man/emerge.1 b/man/emerge.1
18 index 94edc90..240d4de 100644
19 --- a/man/emerge.1
20 +++ b/man/emerge.1
21 @@ -412,7 +412,7 @@ precedence over existing changes. This option is automatically enabled with
22 .BR \-\-backtrack=COUNT
23 Specifies an integer number of times to backtrack if
24 dependency calculation fails due to a conflict or an
25 -unsatisfied dependency (default: \'3\').
26 +unsatisfied dependency (default: \'10\').
27 .TP
28 .BR "\-\-binpkg\-changed\-deps [ y | n ]"
29 Tells emerge to ignore binary packages for which the corresponding
30 diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
31 index 53910dd..cda497b 100644
32 --- a/pym/_emerge/depgraph.py
33 +++ b/pym/_emerge/depgraph.py
34 @@ -9460,7 +9460,7 @@ def _backtrack_depgraph(settings, trees, myopts, myparams, myaction, myfiles, sp
35
36 debug = "--debug" in myopts
37 mydepgraph = None
38 - max_retries = myopts.get('--backtrack', 3)
39 + max_retries = myopts.get('--backtrack', 10)
40 max_depth = max(1, (max_retries + 1) // 2)
41 allow_backtracking = max_retries > 0
42 backtracker = Backtracker(max_depth)
43 --
44 2.10.2

Replies