Gentoo Archives: gentoo-commits

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