From e38e06890223d6e31667816536c2ca9bb89d9c0c Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 6 Jul 2007 03:10:45 +0000 Subject: [PATCH] Remove the PKG_*ARG* color classes in order to simplify things since it's questionable whether many people will want to use them. Also, make the PKG_*SYSTEM colors default to the traditional colors since people are generally most interested in world packages. (trunk r7174) svn path=/main/branches/2.1.2/; revision=7175 --- bin/emerge | 47 +++++++++++++++-------------------------------- man/color.map.5 | 28 ++-------------------------- pym/output.py | 10 ++-------- 3 files changed, 19 insertions(+), 66 deletions(-) diff --git a/bin/emerge b/bin/emerge index 0b061b735..d850b2736 100755 --- a/bin/emerge +++ b/bin/emerge @@ -2981,54 +2981,37 @@ class depgraph: root_config = self.roots[myroot] system_set = root_config.sets["system"] world_set = root_config.sets["world"] - args_set = self._sets["args"] - pkg_arg = False pkg_system = False pkg_world = False try: - if myroot == self.target_root: - pkg_arg = args_set.findAtomForPackage(pkg_key, metadata) pkg_system = system_set.findAtomForPackage(pkg_key, metadata) pkg_world = world_set.findAtomForPackage(pkg_key, metadata) - if not pkg_world and myroot == self.target_root: + if not pkg_world and myroot == self.target_root and \ + favorites_set.findAtomForPackage(pkg_key, metadata): # Maybe it will be added to world now. - pkg_world = favorites_set.findAtomForPackage(pkg_key, metadata) + if create_world_atom(pkg_key, metadata, + favorites_set, root_config.sets, portdb): + pkg_world = True except portage_exception.InvalidDependString: # This is reported elsewhere if relevant. pass def pkgprint(pkg): if pkg_merge: - if pkg_arg: - if pkg_world: - return colorize("PKG_MERGE_ARG_WORLD", pkg) - elif pkg_system: - return colorize("PKG_MERGE_ARG_SYSTEM", pkg) - else: - return colorize("PKG_MERGE_ARG", pkg) + if pkg_world: + return colorize("PKG_MERGE_WORLD", pkg) + elif pkg_system: + return colorize("PKG_MERGE_SYSTEM", pkg) else: - if pkg_world: - return colorize("PKG_MERGE_WORLD", pkg) - elif pkg_system: - return colorize("PKG_MERGE_SYSTEM", pkg) - else: - return colorize("PKG_MERGE", pkg) + return colorize("PKG_MERGE", pkg) else: - if pkg_arg: - if pkg_world: - return colorize("PKG_NOMERGE_ARG_WORLD", pkg) - elif pkg_system: - return colorize("PKG_NOMERGE_ARG_SYSTEM", pkg) - else: - return colorize("PKG_NOMERGE_ARG", pkg) + if pkg_world: + return colorize("PKG_NOMERGE_WORLD", pkg) + elif pkg_system: + return colorize("PKG_NOMERGE_SYSTEM", pkg) else: - if pkg_world: - return colorize("PKG_NOMERGE_WORLD", pkg) - elif pkg_system: - return colorize("PKG_NOMERGE_SYSTEM", pkg) - else: - return colorize("PKG_NOMERGE", pkg) + return colorize("PKG_NOMERGE", pkg) if x[1]!="/": if myoldbest: diff --git a/man/color.map.5 b/man/color.map.5 index 7f2b03c6e..7f4cfde0b 100644 --- a/man/color.map.5 +++ b/man/color.map.5 @@ -31,49 +31,25 @@ Defines color used for numbers used in merge progress lists. \fBPKG_MERGE\fR = \fI"0x00AA00"\fR Defines color used for packages planned to be merged. .TP -\fBPKG_MERGE_ARG\fR = \fI"0x00AA00"\fR -Defines color used for packages planned to be merged and given as command line -arguments. -.TP -\fBPKG_MERGE_SYSTEM\fR = \fI"0x55FF55"\fR +\fBPKG_MERGE_SYSTEM\fR = \fI"0x00AA00"\fR Defines color used for packages planned to be merged and belonging to system set. .TP -\fBPKG_MERGE_ARG_SYSTEM\fR = \fI"0x55FF55"\fR -Defines color used for system packages planned to be merged and given as -command line arguments. -.TP \fBPKG_MERGE_WORLD\fR = \fI"0x55FF55"\fR Defines color used for packages planned to be merged and belonging to world set. .TP -\fBPKG_MERGE_ARG_WORLD\fR = \fI"0x55FF55"\fR -Defines color used for world packages planned to be merged and given as -command line arguments. -.TP \fBPKG_NOMERGE\fR = \fI"0x0000AA"\fR Defines color used for packages not planned to be merged. .TP -\fBPKG_NOMERGE_ARG\fR = \fI"0x0000AA"\fR -Defines color used for packages not planned to be merged and given as command -line arguments. -.TP -\fBPKG_NOMERGE_SYSTEM\fR = \fI"0x5555FF"\fR +\fBPKG_NOMERGE_SYSTEM\fR = \fI"0x0000AA"\fR Defines color used for packages not planned to be merged and belonging to system set. .TP -\fBPKG_NOMERGE_ARG_SYSTEM\fR = \fI"0x5555FF"\fR -Defines color used for system packages not planned to be merged and given as -command line arguments. -.TP \fBPKG_NOMERGE_WORLD\fR = \fI"0x5555FF"\fR Defines color used for packages not planned to be merged and belonging to world set. .TP -\fBPKG_NOMERGE_ARG_WORLD\fR = \fI"0x5555FF"\fR -Defines color used for world packages not planned to be merged and given as -command line arguments. -.TP \fBSECURITY_WARN\fR = \fI"0xFF5555"\fR Defines color used for security warnings. .TP diff --git a/pym/output.py b/pym/output.py index 2079bf6d9..3a1bce4e0 100644 --- a/pym/output.py +++ b/pym/output.py @@ -142,17 +142,11 @@ codes["UNMERGE_WARN"] = codes["red"] codes["SECURITY_WARN"] = codes["red"] codes["MERGE_LIST_PROGRESS"] = codes["yellow"] codes["PKG_MERGE"] = codes["darkgreen"] -codes["PKG_MERGE_ARG"] = codes["darkgreen"] -codes["PKG_MERGE_SYSTEM"] = codes["green"] +codes["PKG_MERGE_SYSTEM"] = codes["darkgreen"] codes["PKG_MERGE_WORLD"] = codes["green"] -codes["PKG_MERGE_ARG_SYSTEM"] = codes["green"] -codes["PKG_MERGE_ARG_WORLD"] = codes["green"] codes["PKG_NOMERGE"] = codes["darkblue"] -codes["PKG_NOMERGE_ARG"] = codes["darkblue"] -codes["PKG_NOMERGE_SYSTEM"] = codes["blue"] +codes["PKG_NOMERGE_SYSTEM"] = codes["darkblue"] codes["PKG_NOMERGE_WORLD"] = codes["blue"] -codes["PKG_NOMERGE_ARG_SYSTEM"] = codes["blue"] -codes["PKG_NOMERGE_ARG_WORLD"] = codes["blue"] def parse_color_map(onerror=None): """ -- 2.26.2