From 621646020cf04e6d47058f045cf88f2d690329d6 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 4 Mar 2010 11:22:15 +0000 Subject: [PATCH] Add new colors for binary packages in the merge list. Thanks to Sebastian Luther (few) for this patch. (trunk r15739) svn path=/main/branches/2.1.7/; revision=15746 --- man/color.map.5 | 9 +++++++++ pym/_emerge/depgraph.py | 18 +++++++++++++----- pym/portage/output.py | 3 +++ 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/man/color.map.5 b/man/color.map.5 index f32fa751c..a9e359232 100644 --- a/man/color.map.5 +++ b/man/color.map.5 @@ -50,6 +50,15 @@ Defines color used for system packages planned to be merged. \fBPKG_MERGE_WORLD\fR = \fI"green"\fR Defines color used for world packages planned to be merged. .TP +\fBPKG_BINARY_MERGE\fR = \fI"darkgreen"\fR +Defines color used for packages planned to be merged using a binary package. +.TP +\fBPKG_BINARY_MERGE_SYSTEM\fR = \fI"darkgreen"\fR +Defines color used for system packages planned to be merged using a binary package. +.TP +\fBPKG_BINARY_MERGE_WORLD\fR = \fI"green"\fR +Defines color used for world packages planned to be merged using a binary package. +.TP \fBPKG_NOMERGE\fR = \fI"darkblue"\fR Defines color used for packages not planned to be merged. .TP diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index b1b655ec1..d05cd466f 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -4500,12 +4500,20 @@ class depgraph(object): def pkgprint(pkg_str): if pkg_merge: - if pkg_system: - return colorize("PKG_MERGE_SYSTEM", pkg_str) - elif pkg_world: - return colorize("PKG_MERGE_WORLD", pkg_str) + if built: + if pkg_system: + return colorize("PKG_BINARY_MERGE_SYSTEM", pkg_str) + elif pkg_world: + return colorize("PKG_BINARY_MERGE_WORLD", pkg_str) + else: + return colorize("PKG_BINARY_MERGE", pkg_str) else: - return colorize("PKG_MERGE", pkg_str) + if pkg_system: + return colorize("PKG_MERGE_SYSTEM", pkg_str) + elif pkg_world: + return colorize("PKG_MERGE_WORLD", pkg_str) + else: + return colorize("PKG_MERGE", pkg_str) elif pkg_status == "uninstall": return colorize("PKG_UNINSTALL", pkg_str) else: diff --git a/pym/portage/output.py b/pym/portage/output.py index 3fbb0c992..7e8ed91cc 100644 --- a/pym/portage/output.py +++ b/pym/portage/output.py @@ -139,6 +139,9 @@ _styles["PKG_BLOCKER_SATISFIED"] = ( "darkblue", ) _styles["PKG_MERGE"] = ( "darkgreen", ) _styles["PKG_MERGE_SYSTEM"] = ( "darkgreen", ) _styles["PKG_MERGE_WORLD"] = ( "green", ) +_styles["PKG_BINARY_MERGE"] = ( "darkgreen", ) +_styles["PKG_BINARY_MERGE_SYSTEM"] = ( "darkgreen", ) +_styles["PKG_BINARY_MERGE_WORLD"] = ( "green", ) _styles["PKG_UNINSTALL"] = ( "red", ) _styles["PKG_NOMERGE"] = ( "darkblue", ) _styles["PKG_NOMERGE_SYSTEM"] = ( "darkblue", ) -- 2.26.2