Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r14763 - in main/trunk: man pym/_emerge
Date: Sat, 31 Oct 2009 23:32:16
Message-Id: E1N4NQb-0003vg-GT@stork.gentoo.org
1 Author: zmedico
2 Date: 2009-10-31 23:32:13 +0000 (Sat, 31 Oct 2009)
3 New Revision: 14763
4
5 Modified:
6 main/trunk/man/emerge.1
7 main/trunk/pym/_emerge/depgraph.py
8 main/trunk/pym/_emerge/help.py
9 main/trunk/pym/_emerge/main.py
10 Log:
11 Add a --backtrack=COUNT option to control how many times backtracking is
12 allowed, and reduce the default from 30 to 5.
13
14
15 Modified: main/trunk/man/emerge.1
16 ===================================================================
17 --- main/trunk/man/emerge.1 2009-10-31 22:59:35 UTC (rev 14762)
18 +++ main/trunk/man/emerge.1 2009-10-31 23:32:13 UTC (rev 14763)
19 @@ -276,6 +276,11 @@
20 intended to be set in the \fBmake.conf\fR(5)
21 \fBEMERGE_DEFAULT_OPTS\fR variable.
22 .TP
23 +.BR \-\-backtrack=COUNT
24 +Specifies an integer number of times to backtrack if
25 +dependency calculation fails due to a conflict or an
26 +unsatisfied dependency (default: \'5\').
27 +.TP
28 .BR "\-\-binpkg\-respect\-use < y | n >"
29 Tells emerge to ignore binary packages if their use flags
30 don't match the current configuration. (default: \'n\')
31
32 Modified: main/trunk/pym/_emerge/depgraph.py
33 ===================================================================
34 --- main/trunk/pym/_emerge/depgraph.py 2009-10-31 22:59:35 UTC (rev 14762)
35 +++ main/trunk/pym/_emerge/depgraph.py 2009-10-31 23:32:13 UTC (rev 14763)
36 @@ -5329,7 +5329,7 @@
37 def _backtrack_depgraph(settings, trees, myopts, myparams,
38 myaction, myfiles, spinner):
39
40 - backtrack_max = 30
41 + backtrack_max = myopts.get('backtrack', 5)
42 runtime_pkg_mask = None
43 allow_backtracking = True
44 backtracked = 0
45
46 Modified: main/trunk/pym/_emerge/help.py
47 ===================================================================
48 --- main/trunk/pym/_emerge/help.py 2009-10-31 22:59:35 UTC (rev 14762)
49 +++ main/trunk/pym/_emerge/help.py 2009-10-31 23:32:13 UTC (rev 14763)
50 @@ -279,6 +279,13 @@
51 for line in wrap(desc, desc_width):
52 print(desc_indent + line)
53 print()
54 + print(" " + green("--backtrack") + " " + turquoise("COUNT"))
55 + desc = "Specifies an integer number of times to backtrack if " + \
56 + "dependency calculation fails due to a conflict or an " + \
57 + "unsatisfied dependency (default: '5')."
58 + for line in wrap(desc, desc_width):
59 + print(desc_indent + line)
60 + print()
61 print(" " + green("--binpkg-respect-use") + \
62 " < " + turquoise("y") + " | " + turquoise("n") + " >")
63 desc = "Tells emerge to ignore binary packages if their use flags" + \
64
65 Modified: main/trunk/pym/_emerge/main.py
66 ===================================================================
67 --- main/trunk/pym/_emerge/main.py 2009-10-31 22:59:35 UTC (rev 14762)
68 +++ main/trunk/pym/_emerge/main.py 2009-10-31 23:32:13 UTC (rev 14763)
69 @@ -510,6 +510,15 @@
70 "help":"temporarily override ACCEPT_PROPERTIES",
71 "action":"store"
72 },
73 +
74 + "--backtrack": {
75 +
76 + "help" : "Specifies how many times to backtrack if dependency " + \
77 + "calculation fails ",
78 +
79 + "action" : "store"
80 + },
81 +
82 "--config-root": {
83 "help":"specify the location for portage configuration files",
84 "action":"store"
85 @@ -731,6 +740,21 @@
86 if myoptions.selective == "True":
87 myoptions.selective = True
88
89 + if myoptions.backtrack is not None:
90 +
91 + try:
92 + backtrack = int(myoptions.backtrack)
93 + except (OverflowError, ValueError):
94 + backtrack = -1
95 +
96 + if backtrack < 0:
97 + backtrack = None
98 + if not silent:
99 + writemsg("!!! Invalid --backtrack parameter: '%s'\n" % \
100 + (myoptions.backtrack,), noiselevel=-1)
101 +
102 + myoptions.backtrack = backtrack
103 +
104 if myoptions.deep is not None:
105 deep = None
106 if myoptions.deep == "True":