1 |
commit: 30e1ece51561f2012d389350ffd8164f90ad636c |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Feb 2 21:56:30 2011 +0000 |
4 |
Commit: Thomas Sachau <tommy <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Feb 2 21:56:30 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=30e1ece5 |
7 |
|
8 |
Display: simplify alignment for mask status |
9 |
|
10 |
--- |
11 |
pym/_emerge/resolver/output.py | 26 +++++++++++--------------- |
12 |
1 files changed, 11 insertions(+), 15 deletions(-) |
13 |
|
14 |
diff --git a/pym/_emerge/resolver/output.py b/pym/_emerge/resolver/output.py |
15 |
index 46e2280..93a2b5d 100644 |
16 |
--- a/pym/_emerge/resolver/output.py |
17 |
+++ b/pym/_emerge/resolver/output.py |
18 |
@@ -85,9 +85,7 @@ class Display(object): |
19 |
self.blocker_style = "PKG_BLOCKER" |
20 |
addl = "%s %s " % (colorize(self.blocker_style, "B"), |
21 |
fetch_symbol) |
22 |
- if self.conf.verbosity == 3: |
23 |
- # add column for mask status |
24 |
- addl += " " |
25 |
+ addl += self.empty_space_in_brackets() |
26 |
self.resolved = dep_expand( |
27 |
str(pkg.atom).lstrip("!"), mydb=self.vardb, |
28 |
settings=self.pkgsettings |
29 |
@@ -181,6 +179,13 @@ class Display(object): |
30 |
|
31 |
return mask_str |
32 |
|
33 |
+ def empty_space_in_brackets(self): |
34 |
+ space = "" |
35 |
+ if self.conf.verbosity == 3: |
36 |
+ # add column for mask status |
37 |
+ space += " " |
38 |
+ return space |
39 |
+ |
40 |
def map_to_use_expand(self, myvals, forced_flags=False, |
41 |
remove_hidden=True): |
42 |
"""Map use expand variables |
43 |
@@ -437,10 +442,7 @@ class Display(object): |
44 |
self.verboseadd = None |
45 |
else: |
46 |
if not pkg_info.merge: |
47 |
- addl = "" |
48 |
- if self.conf.verbosity == 3: |
49 |
- # add column for mask status |
50 |
- addl += " " |
51 |
+ addl = self.empty_space_in_brackets() |
52 |
myprint = "[%s%s] %s%s" % \ |
53 |
(self.pkgprint(pkg_info.operation.ljust(13), pkg_info), |
54 |
addl, self.indent, self.pkgprint(pkg.cp, pkg_info)) |
55 |
@@ -466,10 +468,7 @@ class Display(object): |
56 |
@rtype the updated addl |
57 |
""" |
58 |
if not pkg_info.merge: |
59 |
- addl = "" |
60 |
- if self.conf.verbosity == 3: |
61 |
- # add column for mask status |
62 |
- addl += " " |
63 |
+ addl = self.empty_space_in_brackets() |
64 |
myprint = "[%s%s] %s%s %s" % \ |
65 |
(self.pkgprint(pkg_info.operation.ljust(13), |
66 |
pkg_info), addl, |
67 |
@@ -827,10 +826,7 @@ class Display(object): |
68 |
addl, pkg_info, pkg) |
69 |
else: |
70 |
if not pkg_info.merge: |
71 |
- addl = "" |
72 |
- if self.conf.verbosity == 3: |
73 |
- # add column for mask status |
74 |
- addl += " " |
75 |
+ addl = self.empty_space_in_brackets() |
76 |
myprint = "[%s%s] " % ( |
77 |
self.pkgprint(pkg_info.operation.ljust(13), |
78 |
pkg_info), addl, |