1 |
Author: zmedico |
2 |
Date: 2008-05-06 00:16:31 +0000 (Tue, 06 May 2008) |
3 |
New Revision: 10215 |
4 |
|
5 |
Modified: |
6 |
main/branches/2.1.2/bin/emerge |
7 |
main/branches/2.1.2/man/color.map.5 |
8 |
main/branches/2.1.2/pym/output.py |
9 |
Log: |
10 |
Display satisfied blockers in green and show a small "b" instead of a |
11 |
big "B" (similar to "f" for satisfied fetch restrictions). |
12 |
(trunk r10214) |
13 |
|
14 |
|
15 |
Modified: main/branches/2.1.2/bin/emerge |
16 |
=================================================================== |
17 |
--- main/branches/2.1.2/bin/emerge 2008-05-06 00:12:51 UTC (rev 10214) |
18 |
+++ main/branches/2.1.2/bin/emerge 2008-05-06 00:16:31 UTC (rev 10215) |
19 |
@@ -4383,24 +4383,35 @@ |
20 |
fetch=" " |
21 |
indent = " " * depth |
22 |
|
23 |
- if x[0]=="blocks": |
24 |
- addl=""+red("B")+" "+fetch+" " |
25 |
+ if isinstance(x, Blocker): |
26 |
+ if x.satisfied: |
27 |
+ blocker_style = "PKG_BLOCKER_SATISFIED" |
28 |
+ addl = "%s %s " % (colorize(blocker_style, "b"), fetch) |
29 |
+ else: |
30 |
+ blocker_style = "PKG_BLOCKER" |
31 |
+ addl = "%s %s " % (colorize(blocker_style, "B"), fetch) |
32 |
if ordered: |
33 |
counters.blocks += 1 |
34 |
+ if x.satisfied: |
35 |
+ counters.blocks_satisfied += 1 |
36 |
resolved = portage.key_expand( |
37 |
pkg_key, mydb=vardb, settings=pkgsettings) |
38 |
if "--columns" in self.myopts and "--quiet" in self.myopts: |
39 |
- addl = addl + " " + red(resolved) |
40 |
+ addl += " " + colorize(blocker_style, resolved) |
41 |
else: |
42 |
- addl = "[blocks " + addl + "] " + indent + red(resolved) |
43 |
+ addl = "[%s %s] %s%s" % \ |
44 |
+ (colorize(blocker_style, "blocks"), |
45 |
+ addl, indent, colorize(blocker_style, resolved)) |
46 |
block_parents = self._blocker_parents.parent_nodes(x) |
47 |
block_parents = set([pnode[2] for pnode in block_parents]) |
48 |
block_parents = ", ".join(block_parents) |
49 |
if resolved!=x[2]: |
50 |
- addl += bad(" (\"%s\" is blocking %s)") % \ |
51 |
+ addl += colorize(blocker_style, |
52 |
+ " (\"%s\" is blocking %s)") % \ |
53 |
(pkg_key, block_parents) |
54 |
else: |
55 |
- addl += bad(" (is blocking %s)") % block_parents |
56 |
+ addl += colorize(blocker_style, |
57 |
+ " (is blocking %s)") % block_parents |
58 |
if isinstance(x, Blocker) and x.satisfied: |
59 |
p.append(addl) |
60 |
else: |
61 |
@@ -5449,6 +5460,7 @@ |
62 |
self.reinst = 0 |
63 |
self.uninst = 0 |
64 |
self.blocks = 0 |
65 |
+ self.blocks_satisfied = 0 |
66 |
self.totalsize = 0 |
67 |
self.restrict_fetch = 0 |
68 |
self.restrict_fetch_satisfied = 0 |
69 |
@@ -5484,10 +5496,6 @@ |
70 |
details.append("%s uninstall" % self.uninst) |
71 |
if self.uninst > 1: |
72 |
details[-1] += "s" |
73 |
- if self.blocks > 0: |
74 |
- details.append("%s block" % self.blocks) |
75 |
- if self.blocks > 1: |
76 |
- details[-1] += "s" |
77 |
myoutput.append(", ".join(details)) |
78 |
if total_installs != 0: |
79 |
myoutput.append(")") |
80 |
@@ -5500,6 +5508,14 @@ |
81 |
if self.restrict_fetch_satisfied < self.restrict_fetch: |
82 |
myoutput.append(bad(" (%s unsatisfied)") % \ |
83 |
(self.restrict_fetch - self.restrict_fetch_satisfied)) |
84 |
+ if self.blocks > 0: |
85 |
+ myoutput.append("\nConflict: %s blocker" % \ |
86 |
+ self.blocks) |
87 |
+ if self.blocks > 1: |
88 |
+ myoutput.append("s") |
89 |
+ if self.blocks_satisfied < self.blocks: |
90 |
+ myoutput.append(bad(" (%s unsatisfied)") % \ |
91 |
+ (self.blocks - self.blocks_satisfied)) |
92 |
return "".join(myoutput) |
93 |
|
94 |
class MergeTask(object): |
95 |
|
96 |
Modified: main/branches/2.1.2/man/color.map.5 |
97 |
=================================================================== |
98 |
--- main/branches/2.1.2/man/color.map.5 2008-05-06 00:12:51 UTC (rev 10214) |
99 |
+++ main/branches/2.1.2/man/color.map.5 2008-05-06 00:16:31 UTC (rev 10215) |
100 |
@@ -30,6 +30,12 @@ |
101 |
\fBMERGE_LIST_PROGRESS\fR = \fI"yellow"\fR |
102 |
Defines color used for numbers indicating merge progress. |
103 |
.TP |
104 |
+\fBPKG_BLOCKER\fR = \fI"red"\fR |
105 |
+Defines color used for unsatisfied blockers. |
106 |
+.TP |
107 |
+\fBPKG_BLOCKER_SATSIFIED\fR = \fI"green"\fR |
108 |
+Defines color used for satisfied blockers. |
109 |
+.TP |
110 |
\fBPKG_MERGE\fR = \fI"darkgreen"\fR |
111 |
Defines color used for packages planned to be merged. |
112 |
.TP |
113 |
|
114 |
Modified: main/branches/2.1.2/pym/output.py |
115 |
=================================================================== |
116 |
--- main/branches/2.1.2/pym/output.py 2008-05-06 00:12:51 UTC (rev 10214) |
117 |
+++ main/branches/2.1.2/pym/output.py 2008-05-06 00:16:31 UTC (rev 10215) |
118 |
@@ -142,6 +142,8 @@ |
119 |
codes["UNMERGE_WARN"] = codes["red"] |
120 |
codes["SECURITY_WARN"] = codes["red"] |
121 |
codes["MERGE_LIST_PROGRESS"] = codes["yellow"] |
122 |
+codes["PKG_BLOCKER"] = codes["red"] |
123 |
+codes["PKG_BLOCKER_SATISFIED"] = codes["green"] |
124 |
codes["PKG_MERGE"] = codes["darkgreen"] |
125 |
codes["PKG_MERGE_SYSTEM"] = codes["darkgreen"] |
126 |
codes["PKG_MERGE_WORLD"] = codes["green"] |
127 |
|
128 |
-- |
129 |
gentoo-commits@l.g.o mailing list |