summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-05-06 00:16:31 +0000
committerZac Medico <zmedico@gentoo.org>2008-05-06 00:16:31 +0000
commitd7e00208d4e4957c3cc4ae443b14b9cdf27a4e0d (patch)
tree37b40620aafd34de3b7b1101f27366bfaa6dac03 /bin
parentbb05db87381f30b5de103548983f61ac154f9f3a (diff)
downloadportage-d7e00208d4e4957c3cc4ae443b14b9cdf27a4e0d.tar.gz
portage-d7e00208d4e4957c3cc4ae443b14b9cdf27a4e0d.tar.bz2
portage-d7e00208d4e4957c3cc4ae443b14b9cdf27a4e0d.zip
Display satisfied blockers in green and show a small "b" instead of a
big "B" (similar to "f" for satisfied fetch restrictions). (trunk r10214) svn path=/main/branches/2.1.2/; revision=10215
Diffstat (limited to 'bin')
-rwxr-xr-xbin/emerge36
1 files changed, 26 insertions, 10 deletions
diff --git a/bin/emerge b/bin/emerge
index 4cc690f38..e7d0d29f9 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -4383,24 +4383,35 @@ class depgraph(object):
fetch=" "
indent = " " * depth
- if x[0]=="blocks":
- addl=""+red("B")+" "+fetch+" "
+ if isinstance(x, Blocker):
+ if x.satisfied:
+ blocker_style = "PKG_BLOCKER_SATISFIED"
+ addl = "%s %s " % (colorize(blocker_style, "b"), fetch)
+ else:
+ blocker_style = "PKG_BLOCKER"
+ addl = "%s %s " % (colorize(blocker_style, "B"), fetch)
if ordered:
counters.blocks += 1
+ if x.satisfied:
+ counters.blocks_satisfied += 1
resolved = portage.key_expand(
pkg_key, mydb=vardb, settings=pkgsettings)
if "--columns" in self.myopts and "--quiet" in self.myopts:
- addl = addl + " " + red(resolved)
+ addl += " " + colorize(blocker_style, resolved)
else:
- addl = "[blocks " + addl + "] " + indent + red(resolved)
+ addl = "[%s %s] %s%s" % \
+ (colorize(blocker_style, "blocks"),
+ addl, indent, colorize(blocker_style, resolved))
block_parents = self._blocker_parents.parent_nodes(x)
block_parents = set([pnode[2] for pnode in block_parents])
block_parents = ", ".join(block_parents)
if resolved!=x[2]:
- addl += bad(" (\"%s\" is blocking %s)") % \
+ addl += colorize(blocker_style,
+ " (\"%s\" is blocking %s)") % \
(pkg_key, block_parents)
else:
- addl += bad(" (is blocking %s)") % block_parents
+ addl += colorize(blocker_style,
+ " (is blocking %s)") % block_parents
if isinstance(x, Blocker) and x.satisfied:
p.append(addl)
else:
@@ -5449,6 +5460,7 @@ class PackageCounters(object):
self.reinst = 0
self.uninst = 0
self.blocks = 0
+ self.blocks_satisfied = 0
self.totalsize = 0
self.restrict_fetch = 0
self.restrict_fetch_satisfied = 0
@@ -5484,10 +5496,6 @@ class PackageCounters(object):
details.append("%s uninstall" % self.uninst)
if self.uninst > 1:
details[-1] += "s"
- if self.blocks > 0:
- details.append("%s block" % self.blocks)
- if self.blocks > 1:
- details[-1] += "s"
myoutput.append(", ".join(details))
if total_installs != 0:
myoutput.append(")")
@@ -5500,6 +5508,14 @@ class PackageCounters(object):
if self.restrict_fetch_satisfied < self.restrict_fetch:
myoutput.append(bad(" (%s unsatisfied)") % \
(self.restrict_fetch - self.restrict_fetch_satisfied))
+ if self.blocks > 0:
+ myoutput.append("\nConflict: %s blocker" % \
+ self.blocks)
+ if self.blocks > 1:
+ myoutput.append("s")
+ if self.blocks_satisfied < self.blocks:
+ myoutput.append(bad(" (%s unsatisfied)") % \
+ (self.blocks - self.blocks_satisfied))
return "".join(myoutput)
class MergeTask(object):