diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-07-06 03:06:39 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-07-06 03:06:39 +0000 |
commit | 75aced724ee3a2a09edd3501633ce5316f2418a9 (patch) | |
tree | e9bbe4daac25bc260e37b1e4f5e06db823bc3201 | |
parent | ef850c47cf1e5f01ccbaf268fe7d7e29e9f2290f (diff) | |
download | portage-75aced724ee3a2a09edd3501633ce5316f2418a9.tar.gz portage-75aced724ee3a2a09edd3501633ce5316f2418a9.tar.bz2 portage-75aced724ee3a2a09edd3501633ce5316f2418a9.zip |
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.
svn path=/main/trunk/; revision=7174
-rw-r--r-- | man/color.map.5 | 28 | ||||
-rw-r--r-- | pym/emerge/__init__.py | 47 | ||||
-rw-r--r-- | pym/portage/output.py | 10 |
3 files changed, 19 insertions, 66 deletions
diff --git a/man/color.map.5 b/man/color.map.5 index 10fa1a09a..9cd4356bc 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/emerge/__init__.py b/pym/emerge/__init__.py index 72573b552..ffd426893 100644 --- a/pym/emerge/__init__.py +++ b/pym/emerge/__init__.py @@ -3034,54 +3034,37 @@ class depgraph(object): 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/pym/portage/output.py b/pym/portage/output.py index 85a8756d9..e4db6f6ff 100644 --- a/pym/portage/output.py +++ b/pym/portage/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): """ |