* [gentoo-commits] proj/portage:multilib commit in: pym/_emerge/resolver/
@ 2011-02-06 13:09 Thomas Sachau
0 siblings, 0 replies; 8+ messages in thread
From: Thomas Sachau @ 2011-02-06 13:09 UTC (permalink / raw
To: gentoo-commits
commit: 13f280f27b455b59ee387e7515a1ccf7b5510d11
Author: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
AuthorDate: Sat Jan 29 04:35:24 2011 +0000
Commit: Thomas Sachau <tommy <AT> gentoo <DOT> org>
CommitDate: Sun Jan 30 09:11:58 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=13f280f2
add keyword output info for masked pkgs, fixes bug 58416
---
pym/_emerge/resolver/output.py | 43 ++++++++++++++++++++++++++++++++++++++-
1 files changed, 41 insertions(+), 2 deletions(-)
diff --git a/pym/_emerge/resolver/output.py b/pym/_emerge/resolver/output.py
index a7b5f5d..4b90e9d 100644
--- a/pym/_emerge/resolver/output.py
+++ b/pym/_emerge/resolver/output.py
@@ -19,7 +19,7 @@ from portage.exception import InvalidDependString
from portage.output import ( blue, bold, colorize, create_color_func,
darkblue, darkgreen, green, nc_len, red, teal, turquoise, yellow )
bad = create_color_func("BAD")
-from portage.util import writemsg_stdout
+from portage.util import writemsg_stdout, writemsg_level
from portage.versions import best, catpkgsplit, cpv_getkey
from _emerge.Blocker import Blocker
@@ -157,6 +157,44 @@ class Display(object):
self.pkgsettings["USE_EXPAND_HIDDEN"].lower().split()
return
+ def _display_keyword(self, pkg):
+ """ keyword display
+
+ @param pkg: _emerge.Package instance
+ Modifies self.verboseadd
+ """
+ accept_keywords = set(self.portdb.settings['ACCEPT_KEYWORDS'].split())
+ keywords = set(self.portdb.aux_get(pkg.cpv, ["KEYWORDS"])[0].split())
+ used_keyword = list(set.intersection(keywords, accept_keywords))
+ if used_keyword and len(used_keyword) == 1:
+ used_keyword = used_keyword[0]
+ elif len(used_keyword) > 1:
+ # you can raise an error here if you prefer, remove it, or set the correct levels
+ writemsg_level( "_emerge.output.resolver.Display(), too many keywords recieved for pkg: %s, %s"
+ % (pkg.cpv, used_keyword))
+ try:
+ pmask = self.portdb.settings.pmaskdict[pkg.cp]
+ except KeyError:
+ pmask = []
+ hardmasked = []
+ for x in pmask:
+ m = self.portdb.xmatch("match-all",x)
+ for n in m:
+ if n not in hardmasked:
+ hardmasked.append(n)
+
+ text = ''
+ if '~' in used_keyword:
+ text = used_keyword
+ elif not used_keyword:
+ text = '**'
+ if text:
+ if pkg.cpv in hardmasked:
+ self.verboseadd += red('%s ' % text)
+ else:
+ self.verboseadd += yellow('%s ' % text)
+ return
+
def map_to_use_expand(self, myvals, forced_flags=False,
remove_hidden=True):
@@ -271,7 +309,7 @@ class Display(object):
def verbose_size(self, pkg, repoadd_set, pkg_info):
- """Determines teh size of the downloads reqired
+ """Determines the size of the downloads reqired
@param pkg: _emerge.Package instance
@param repoadd_set: set of repos to add
@@ -770,6 +808,7 @@ class Display(object):
self._get_installed_best(pkg, pkg_info)
self.verboseadd = ""
self.repoadd = None
+ self._display_keyword(pkg)
self._display_use(pkg, pkg_info.oldbest, myinslotlist)
self.recheck_hidden(pkg)
if self.conf.verbosity == 3:
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] proj/portage:multilib commit in: pym/_emerge/resolver/
@ 2011-02-06 13:09 Thomas Sachau
0 siblings, 0 replies; 8+ messages in thread
From: Thomas Sachau @ 2011-02-06 13:09 UTC (permalink / raw
To: gentoo-commits
commit: a322face1a21f53edff473f54480bc54b31198af
Author: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
AuthorDate: Sun Jan 30 09:34:28 2011 +0000
Commit: Thomas Sachau <tommy <AT> gentoo <DOT> org>
CommitDate: Sun Jan 30 09:36:48 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=a322face
make it only print if it is due to an override setting
---
pym/_emerge/resolver/output.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/pym/_emerge/resolver/output.py b/pym/_emerge/resolver/output.py
index d7d18c9..54b19f2 100644
--- a/pym/_emerge/resolver/output.py
+++ b/pym/_emerge/resolver/output.py
@@ -165,7 +165,7 @@ class Display(object):
"""
used_keyword = pkg.accepted_keyword()
hardmasked = pkg.isHardMasked()
- if used_keyword:
+ if used_keyword not in self.pkgsettings['ACCEPT_KEYWORDS'] or hardmasked:
if hardmasked:
self.verboseadd += 'keyword=' + red('[%s] ' % used_keyword)
else:
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] proj/portage:multilib commit in: pym/_emerge/resolver/
@ 2011-02-06 13:09 Thomas Sachau
0 siblings, 0 replies; 8+ messages in thread
From: Thomas Sachau @ 2011-02-06 13:09 UTC (permalink / raw
To: gentoo-commits
commit: 320cee9c946c19bc0e63f48ac1be4ab613fd7b71
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Gentoo <DOT> Org>
AuthorDate: Sun Jan 30 13:35:54 2011 +0000
Commit: Thomas Sachau <tommy <AT> gentoo <DOT> org>
CommitDate: Sun Jan 30 13:35:54 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=320cee9c
Fix a typo.
---
pym/_emerge/resolver/output.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/pym/_emerge/resolver/output.py b/pym/_emerge/resolver/output.py
index 54b19f2..51d9d3c 100644
--- a/pym/_emerge/resolver/output.py
+++ b/pym/_emerge/resolver/output.py
@@ -1,4 +1,4 @@
-# Copyright 2010 Gentoo Foundation
+# Copyright 2010-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
"""Resolver output display operation.
@@ -285,7 +285,7 @@ class Display(object):
def verbose_size(self, pkg, repoadd_set, pkg_info):
- """Determines the size of the downloads reqired
+ """Determines the size of the downloads required
@param pkg: _emerge.Package instance
@param repoadd_set: set of repos to add
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] proj/portage:multilib commit in: pym/_emerge/resolver/
@ 2011-02-06 13:09 Thomas Sachau
0 siblings, 0 replies; 8+ messages in thread
From: Thomas Sachau @ 2011-02-06 13:09 UTC (permalink / raw
To: gentoo-commits
commit: b0ee82d8502a8f4ed11fefb3d01dba1d7cb5145d
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 31 01:11:57 2011 +0000
Commit: Thomas Sachau <tommy <AT> gentoo <DOT> org>
CommitDate: Mon Jan 31 01:11:57 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=b0ee82d8
Display: show masks in the [ ] part
Symbol | Mask Type
-------|-----------------
# | package.mask
* | missing keyword
~ | unstable keyword
---
pym/_emerge/resolver/output.py | 27 ++++++++++++++++-----------
1 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/pym/_emerge/resolver/output.py b/pym/_emerge/resolver/output.py
index ffee6da..f2e2600 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 += " "
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] proj/portage:multilib commit in: pym/_emerge/resolver/
@ 2011-02-06 13:09 Thomas Sachau
0 siblings, 0 replies; 8+ messages in thread
From: Thomas Sachau @ 2011-02-06 13:09 UTC (permalink / raw
To: gentoo-commits
commit: 53a0fa1b88bbf529bb8875cb63db74dca628e648
Author: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
AuthorDate: Mon Jan 31 04:35:29 2011 +0000
Commit: Thomas Sachau <tommy <AT> gentoo <DOT> org>
CommitDate: Mon Jan 31 05:33:15 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=53a0fa1b
fix a "*" being added for a stable pkg-ver
---
pym/_emerge/resolver/output.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/pym/_emerge/resolver/output.py b/pym/_emerge/resolver/output.py
index f2e2600..99930b2 100644
--- a/pym/_emerge/resolver/output.py
+++ b/pym/_emerge/resolver/output.py
@@ -163,16 +163,17 @@ class Display(object):
"""
used_keyword = pkg.accepted_keyword()
hardmasked = pkg.isHardMasked()
+ mask_str = " "
if hardmasked:
mask_str = colorize("BAD", "#")
+ elif not used_keyword:
+ pass
elif used_keyword not in self.pkgsettings['ACCEPT_KEYWORDS'].split():
if used_keyword == "**":
mask_str = colorize("BAD", "*")
else:
mask_str = colorize("WARN", "~")
- else:
- mask_str = " "
return mask_str
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] proj/portage:multilib commit in: pym/_emerge/resolver/
@ 2011-02-06 13:09 Thomas Sachau
0 siblings, 0 replies; 8+ messages in thread
From: Thomas Sachau @ 2011-02-06 13:09 UTC (permalink / raw
To: gentoo-commits
commit: 5468bd609133a2cdf172e880b103dc8bc6f8c24a
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 31 08:34:20 2011 +0000
Commit: Thomas Sachau <tommy <AT> gentoo <DOT> org>
CommitDate: Mon Jan 31 08:34:20 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=5468bd60
Display: align blocker and nomerge nodes
---
pym/_emerge/resolver/output.py | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/pym/_emerge/resolver/output.py b/pym/_emerge/resolver/output.py
index 99930b2..3346c07 100644
--- a/pym/_emerge/resolver/output.py
+++ b/pym/_emerge/resolver/output.py
@@ -85,6 +85,9 @@ class Display(object):
self.blocker_style = "PKG_BLOCKER"
addl = "%s %s " % (colorize(self.blocker_style, "B"),
fetch_symbol)
+ if self.conf.verbosity == 3:
+ # add column for mask status
+ addl += " "
self.resolved = dep_expand(
str(pkg.atom).lstrip("!"), mydb=self.vardb,
settings=self.pkgsettings
@@ -815,9 +818,13 @@ class Display(object):
addl, pkg_info, pkg)
else:
if not pkg_info.merge:
- myprint = "[%s] " % (
+ addl = ""
+ if self.conf.verbosity == 3:
+ # add column for mask status
+ addl += " "
+ myprint = "[%s%s] " % (
self.pkgprint(pkg_info.operation.ljust(13),
- pkg_info)
+ pkg_info), addl,
)
else:
myprint = "[%s %s] " % (
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] proj/portage:multilib commit in: pym/_emerge/resolver/
@ 2011-02-06 13:09 Thomas Sachau
0 siblings, 0 replies; 8+ messages in thread
From: Thomas Sachau @ 2011-02-06 13:09 UTC (permalink / raw
To: gentoo-commits
commit: 22c952cdc35e5183237029e72dadbe1365e2b110
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 31 08:43:52 2011 +0000
Commit: Thomas Sachau <tommy <AT> gentoo <DOT> org>
CommitDate: Mon Jan 31 08:43:52 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=22c952cd
Display: align nomerge nodes more
---
pym/_emerge/resolver/output.py | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/pym/_emerge/resolver/output.py b/pym/_emerge/resolver/output.py
index 3346c07..be07656 100644
--- a/pym/_emerge/resolver/output.py
+++ b/pym/_emerge/resolver/output.py
@@ -436,9 +436,13 @@ class Display(object):
self.verboseadd = None
else:
if not pkg_info.merge:
- myprint = "[%s] %s%s" % \
+ addl = ""
+ if self.conf.verbosity == 3:
+ # add column for mask status
+ addl += " "
+ myprint = "[%s%s] %s%s" % \
(self.pkgprint(pkg_info.operation.ljust(13), pkg_info),
- self.indent, self.pkgprint(pkg.cp, pkg_info))
+ addl, self.indent, self.pkgprint(pkg.cp, pkg_info))
else:
myprint = "[%s %s] %s%s" % \
(self.pkgprint(pkg.type_name, pkg_info), addl,
@@ -461,9 +465,13 @@ class Display(object):
@rtype the updated addl
"""
if not pkg_info.merge:
- myprint = "[%s] %s%s %s" % \
+ addl = ""
+ if self.conf.verbosity == 3:
+ # add column for mask status
+ addl += " "
+ myprint = "[%s%s] %s%s %s" % \
(self.pkgprint(pkg_info.operation.ljust(13),
- pkg_info),
+ pkg_info), addl,
self.indent, self.pkgprint(pkg.cpv, pkg_info),
pkg_info.oldbest)
else:
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] proj/portage:multilib commit in: pym/_emerge/resolver/
@ 2011-02-06 13:10 Thomas Sachau
0 siblings, 0 replies; 8+ messages in thread
From: Thomas Sachau @ 2011-02-06 13:10 UTC (permalink / raw
To: gentoo-commits
commit: 30e1ece51561f2012d389350ffd8164f90ad636c
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 2 21:56:30 2011 +0000
Commit: Thomas Sachau <tommy <AT> gentoo <DOT> org>
CommitDate: Wed Feb 2 21:56:30 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=30e1ece5
Display: simplify alignment for mask status
---
pym/_emerge/resolver/output.py | 26 +++++++++++---------------
1 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/pym/_emerge/resolver/output.py b/pym/_emerge/resolver/output.py
index 46e2280..93a2b5d 100644
--- a/pym/_emerge/resolver/output.py
+++ b/pym/_emerge/resolver/output.py
@@ -85,9 +85,7 @@ class Display(object):
self.blocker_style = "PKG_BLOCKER"
addl = "%s %s " % (colorize(self.blocker_style, "B"),
fetch_symbol)
- if self.conf.verbosity == 3:
- # add column for mask status
- addl += " "
+ addl += self.empty_space_in_brackets()
self.resolved = dep_expand(
str(pkg.atom).lstrip("!"), mydb=self.vardb,
settings=self.pkgsettings
@@ -181,6 +179,13 @@ class Display(object):
return mask_str
+ def empty_space_in_brackets(self):
+ space = ""
+ if self.conf.verbosity == 3:
+ # add column for mask status
+ space += " "
+ return space
+
def map_to_use_expand(self, myvals, forced_flags=False,
remove_hidden=True):
"""Map use expand variables
@@ -437,10 +442,7 @@ class Display(object):
self.verboseadd = None
else:
if not pkg_info.merge:
- addl = ""
- if self.conf.verbosity == 3:
- # add column for mask status
- addl += " "
+ addl = self.empty_space_in_brackets()
myprint = "[%s%s] %s%s" % \
(self.pkgprint(pkg_info.operation.ljust(13), pkg_info),
addl, self.indent, self.pkgprint(pkg.cp, pkg_info))
@@ -466,10 +468,7 @@ class Display(object):
@rtype the updated addl
"""
if not pkg_info.merge:
- addl = ""
- if self.conf.verbosity == 3:
- # add column for mask status
- addl += " "
+ addl = self.empty_space_in_brackets()
myprint = "[%s%s] %s%s %s" % \
(self.pkgprint(pkg_info.operation.ljust(13),
pkg_info), addl,
@@ -827,10 +826,7 @@ class Display(object):
addl, pkg_info, pkg)
else:
if not pkg_info.merge:
- addl = ""
- if self.conf.verbosity == 3:
- # add column for mask status
- addl += " "
+ addl = self.empty_space_in_brackets()
myprint = "[%s%s] " % (
self.pkgprint(pkg_info.operation.ljust(13),
pkg_info), addl,
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-02-06 13:17 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-06 13:09 [gentoo-commits] proj/portage:multilib commit in: pym/_emerge/resolver/ Thomas Sachau
-- strict thread matches above, loose matches on Subject: below --
2011-02-06 13:09 Thomas Sachau
2011-02-06 13:09 Thomas Sachau
2011-02-06 13:09 Thomas Sachau
2011-02-06 13:09 Thomas Sachau
2011-02-06 13:09 Thomas Sachau
2011-02-06 13:09 Thomas Sachau
2011-02-06 13:10 Thomas Sachau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox