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