summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-01-30 17:11:57 -0800
committerZac Medico <zmedico@gentoo.org>2011-01-30 17:11:57 -0800
commitb0ee82d8502a8f4ed11fefb3d01dba1d7cb5145d (patch)
tree7c4d5b8734a17ca8b6fec4632e7f5832730f9e7e
parent77f39aae4f2f3604407ca942bbfa58ef51bfa3a8 (diff)
downloadportage-b0ee82d8502a8f4ed11fefb3d01dba1d7cb5145d.tar.gz
portage-b0ee82d8502a8f4ed11fefb3d01dba1d7cb5145d.tar.bz2
portage-b0ee82d8502a8f4ed11fefb3d01dba1d7cb5145d.zip
Display: show masks in the [ ] part
Symbol | Mask Type -------|----------------- # | package.mask * | missing keyword ~ | unstable keyword
-rw-r--r--pym/_emerge/resolver/output.py27
1 files changed, 16 insertions, 11 deletions
diff --git a/pym/_emerge/resolver/output.py b/pym/_emerge/resolver/output.py
index ffee6dab3..f2e2600ee 100644
--- a/pym/_emerge/resolver/output.py
+++ b/pym/_emerge/resolver/output.py
@@ -157,20 +157,24 @@ class Display(object):
self.pkgsettings["USE_EXPAND_HIDDEN"].lower().split()
return
- def _display_keyword(self, pkg):
- """ keyword display
-
+ def gen_mask_str(self, pkg):
+ """
@param pkg: _emerge.Package instance
- Modifies self.verboseadd
"""
used_keyword = pkg.accepted_keyword()
hardmasked = pkg.isHardMasked()
- if used_keyword not in self.pkgsettings['ACCEPT_KEYWORDS'].split() or hardmasked:
- if hardmasked:
- self.verboseadd += 'keyword=' + red('[%s] ' % used_keyword)
+
+ if hardmasked:
+ mask_str = colorize("BAD", "#")
+ elif used_keyword not in self.pkgsettings['ACCEPT_KEYWORDS'].split():
+ if used_keyword == "**":
+ mask_str = colorize("BAD", "*")
else:
- self.verboseadd += 'keyword=' + yellow('%s ' % used_keyword)
- return
+ mask_str = colorize("WARN", "~")
+ else:
+ mask_str = " "
+
+ return mask_str
def map_to_use_expand(self, myvals, forced_flags=False,
remove_hidden=True):
@@ -784,8 +788,6 @@ class Display(object):
self._get_installed_best(pkg, pkg_info)
self.verboseadd = ""
self.repoadd = None
- if self.conf.verbosity == 3:
- self._display_keyword(pkg)
self._display_use(pkg, pkg_info.oldbest, myinslotlist)
self.recheck_hidden(pkg)
if self.conf.verbosity == 3:
@@ -801,6 +803,9 @@ class Display(object):
self.check_system_world(pkg)
addl = self.set_interactive(pkg, pkg_info.ordered, addl)
+ if self.conf.verbosity == 3:
+ addl += self.gen_mask_str(pkg)
+
if pkg.root != "/":
if pkg_info.oldbest:
pkg_info.oldbest += " "