aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-10-13 20:06:05 (GMT)
committerZac Medico <zmedico@gentoo.org>2012-10-13 20:06:05 (GMT)
commitd39d032f2bc5359f95cd523ec39a9d3bb5fa77e4 (patch)
tree506bd19d20ded5ac853169a39ecfdf8a26aff6ae
parentAdd QA_MULTILIB_PATHS for bug #437910. (diff)
downloadportage-d39d032f2bc5359f95cd523ec39a9d3bb5fa77e4.zip
portage-d39d032f2bc5359f95cd523ec39a9d3bb5fa77e4.tar.gz
portage-d39d032f2bc5359f95cd523ec39a9d3bb5fa77e4.tar.bz2
MergeListItem: color binary display, bug #438254
-rw-r--r--pym/_emerge/MergeListItem.py8
-rw-r--r--pym/_emerge/PackageMerge.py7
2 files changed, 10 insertions, 5 deletions
diff --git a/pym/_emerge/MergeListItem.py b/pym/_emerge/MergeListItem.py
index 8086c68..4ce2cd1 100644
--- a/pym/_emerge/MergeListItem.py
+++ b/pym/_emerge/MergeListItem.py
@@ -1,4 +1,4 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from portage import os
@@ -47,8 +47,10 @@ class MergeListItem(CompositeTask):
action_desc = "Emerging"
preposition = "for"
+ pkg_color = "PKG_MERGE"
if pkg.type_name == "binary":
- action_desc += " binary"
+ pkg_color = "PKG_BINARY_MERGE"
+ action_desc += " " + colorize(pkg_color, "binary")
if build_opts.fetchonly:
action_desc = "Fetching"
@@ -57,7 +59,7 @@ class MergeListItem(CompositeTask):
(action_desc,
colorize("MERGE_LIST_PROGRESS", str(pkg_count.curval)),
colorize("MERGE_LIST_PROGRESS", str(pkg_count.maxval)),
- colorize("GOOD", pkg.cpv))
+ colorize(pkg_color, pkg.cpv))
portdb = pkg.root_config.trees["porttree"].dbapi
portdir_repo_name = portdb.getRepositoryName(portdb.porttree_root)
diff --git a/pym/_emerge/PackageMerge.py b/pym/_emerge/PackageMerge.py
index eed34e9..ef298ca 100644
--- a/pym/_emerge/PackageMerge.py
+++ b/pym/_emerge/PackageMerge.py
@@ -1,4 +1,4 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from _emerge.CompositeTask import CompositeTask
@@ -11,6 +11,9 @@ class PackageMerge(CompositeTask):
self.scheduler = self.merge.scheduler
pkg = self.merge.pkg
pkg_count = self.merge.pkg_count
+ pkg_color = "PKG_MERGE"
+ if pkg.type_name == "binary":
+ pkg_color = "PKG_BINARY_MERGE"
if pkg.installed:
action_desc = "Uninstalling"
@@ -26,7 +29,7 @@ class PackageMerge(CompositeTask):
msg = "%s %s%s" % \
(action_desc,
counter_str,
- colorize("GOOD", pkg.cpv))
+ colorize(pkg_color, pkg.cpv))
if pkg.root_config.settings["ROOT"] != "/":
msg += " %s %s" % (preposition, pkg.root)