From: Zac Medico Date: Sat, 13 Oct 2012 20:06:05 +0000 (-0700) Subject: MergeListItem: color binary display, bug #438254 X-Git-Tag: v2.2.0_alpha138~17 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d39d032f2bc5359f95cd523ec39a9d3bb5fa77e4;p=portage.git MergeListItem: color binary display, bug #438254 --- diff --git a/pym/_emerge/MergeListItem.py b/pym/_emerge/MergeListItem.py index 8086c689a..4ce2cd17f 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 eed34e99b..ef298ca48 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)