diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-07-06 21:14:40 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-07-06 21:14:40 +0000 |
commit | 39e952a62b6c9b6b92470796b114fca17dfb93ea (patch) | |
tree | 535ccc2579a908092eb8719459f504bac6337a27 | |
parent | 3e05607151525d6366c70186629aa7386e1613e1 (diff) | |
download | portage-39e952a62b6c9b6b92470796b114fca17dfb93ea.tar.gz portage-39e952a62b6c9b6b92470796b114fca17dfb93ea.tar.bz2 portage-39e952a62b6c9b6b92470796b114fca17dfb93ea.zip |
Misc color fixes. Thanks to Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA@GMail.Com> for this patch from bug#183861, comment #9.
svn path=/main/trunk/; revision=7183
-rw-r--r-- | man/color.map.5 | 122 | ||||
-rw-r--r-- | pym/emerge/__init__.py | 14 | ||||
-rw-r--r-- | pym/portage/output.py | 24 |
3 files changed, 116 insertions, 44 deletions
diff --git a/man/color.map.5 b/man/color.map.5 index 9cd4356bc..f1ace1c25 100644 --- a/man/color.map.5 +++ b/man/color.map.5 @@ -1,4 +1,4 @@ -.TH "COLOR.MAP" "5" "Jun 2007" "Portage 2.1.3" "Portage" +.TH "COLOR.MAP" "5" "Jul 2007" "Portage 2.1.3" "Portage" .SH "NAME" color.map \- custom color settings for Portage .SH "SYNOPSIS" @@ -8,56 +8,127 @@ This file contains variables that define color classes used by Portage. Portage will check this file first for color classes settings. If no setting of given color class is found in /etc/portage/color.map, Portage uses default value defined internally. +.SH "SYNTAX" +\fBVARIABLE\fR = \fI[space delimited list of attributes]\fR .SH "VARIABLES" .TP -\fBBAD\fR = \fI"0xFF5555"\fR +\fBBAD\fR = \fI"red"\fR Defines color used for some words occuring in bad context. .TP -\fBBRACKET\fR = \fI"0x5555FF"\fR +\fBBRACKET\fR = \fI"blue"\fR Defines color used for brackets. .TP -\fBGOOD\fR = \fI"0x55FF55"\fR +\fBGOOD\fR = \fI"green"\fR Defines color used for some words occuring in good context. .TP -\fBHILITE\fR = \fI"0x00AAAA"\fR +\fBHILITE\fR = \fI"teal"\fR Defines color used for highlighted words. .TP -\fBINFORM\fR = \fI"0x00AA00"\fR +\fBINFORM\fR = \fI"darkgreen"\fR Defines color used for informational words. .TP -\fBMERGE_LIST_PROGRESS\fR = \fI"0xFFFF55"\fR -Defines color used for numbers used in merge progress lists. +\fBMERGE_LIST_PROGRESS\fR = \fI"yellow"\fR +Defines color used for numbers indicating merge progress. .TP -\fBPKG_MERGE\fR = \fI"0x00AA00"\fR +\fBPKG_MERGE\fR = \fI"darkgreen"\fR Defines color used for packages planned to be merged. .TP -\fBPKG_MERGE_SYSTEM\fR = \fI"0x00AA00"\fR -Defines color used for packages planned to be merged and belonging to -system set. +\fBPKG_MERGE_SYSTEM\fR = \fI"darkgreen"\fR +Defines color used for system packages planned to be merged. .TP -\fBPKG_MERGE_WORLD\fR = \fI"0x55FF55"\fR -Defines color used for packages planned to be merged and belonging to -world set. +\fBPKG_MERGE_WORLD\fR = \fI"green"\fR +Defines color used for world packages planned to be merged. .TP -\fBPKG_NOMERGE\fR = \fI"0x0000AA"\fR +\fBPKG_NOMERGE\fR = \fI"darkblue"\fR Defines color used for packages not planned to be merged. .TP -\fBPKG_NOMERGE_SYSTEM\fR = \fI"0x0000AA"\fR -Defines color used for packages not planned to be merged and belonging to -system set. +\fBPKG_NOMERGE_SYSTEM\fR = \fI"darkblue"\fR +Defines color used for system packages not planned to be merged. .TP -\fBPKG_NOMERGE_WORLD\fR = \fI"0x5555FF"\fR -Defines color used for packages not planned to be merged and belonging to -world set. +\fBPKG_NOMERGE_WORLD\fR = \fI"blue"\fR +Defines color used for world packages not planned to be merged. .TP -\fBSECURITY_WARN\fR = \fI"0xFF5555"\fR +\fBSECURITY_WARN\fR = \fI"red"\fR Defines color used for security warnings. .TP -\fBUNMERGE_WARN\fR = \fI"0xFF5555"\fR +\fBUNMERGE_WARN\fR = \fI"red"\fR Defines color used for unmerge warnings. .TP -\fBWARN\fR = \fI"0xFFFF55"\fR +\fBWARN\fR = \fI"yellow"\fR Defines color used for warnings. +.SH "LIST OF VALID ATTRIBUTES" +.TP +.B Foreground colors +.RS +.TP +.B black +.TP +.B darkgray +.TP +.B darkred +.TP +.B red +.TP +.B darkgreen +.TP +.B green +.TP +\fBbrown\fR = \fBdarkyellow\fR +.TP +.B yellow +.TP +.B darkblue +.TP +.B blue +.TP +.B purple +.TP +.B fuchsia +.TP +.B teal +.TP +.B turquoise +.TP +.B lightgray +.TP +.B white +.RE +.TP +.B Background colors +.RS +.TP +.B bg_black +.TP +.B bg_darkred +.TP +.B bg_darkgreen +.TP +\fBbg_brown\fR = \fBbg_darkyellow\fR +.TP +.B bg_darkblue +.TP +.B bg_purple +.TP +.B bg_teal +.TP +.B bg_lightgray +.RE +.TP +.B Other attributes +.RS +.TP +.B bold +.TP +.B faint +.TP +.B standout +.TP +.B underline +.TP +.B blink +.TP +.B reverse +.RE .SH "REPORTING BUGS" Please report bugs via http://bugs.gentoo.org/ .SH "AUTHORS" @@ -72,6 +143,7 @@ Contains variables customizing colors. .B /etc/make.conf Contains other variables. .SH "SEE ALSO" +.BR console_codes (4), .BR make.conf (5), .BR portage (5), .BR emerge (1), diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py index dc1df199d..4bf288af5 100644 --- a/pym/emerge/__init__.py +++ b/pym/emerge/__init__.py @@ -694,7 +694,7 @@ def create_world_atom(pkg_key, metadata, args_set, sets, portdb): atom will be returned. Atoms that are in the system set may also be stored in world since system atoms can only match one slot while world atoms can be greedy with respect to slots. Unslotted system packages will not be - not be stored in world.""" + stored in world.""" arg_atom = args_set.findAtomForPackage(pkg_key, metadata) cp = portage.dep_getkey(arg_atom) new_world_atom = cp @@ -3060,17 +3060,17 @@ class depgraph(object): def pkgprint(pkg): if pkg_merge: - if pkg_world: - return colorize("PKG_MERGE_WORLD", pkg) - elif pkg_system: + if pkg_system: return colorize("PKG_MERGE_SYSTEM", pkg) + elif pkg_world: + return colorize("PKG_MERGE_WORLD", pkg) else: return colorize("PKG_MERGE", pkg) else: - if pkg_world: - return colorize("PKG_NOMERGE_WORLD", pkg) - elif pkg_system: + if pkg_system: return colorize("PKG_NOMERGE_SYSTEM", pkg) + elif pkg_world: + return colorize("PKG_NOMERGE_WORLD", pkg) else: return colorize("PKG_NOMERGE", pkg) diff --git a/pym/portage/output.py b/pym/portage/output.py index e4db6f6ff..1dd45866d 100644 --- a/pym/portage/output.py +++ b/pym/portage/output.py @@ -117,17 +117,17 @@ codes["darkteal"] = codes["turquoise"] # Some terminals have darkyellow instead of brown. codes["0xAAAA00"] = codes["brown"] codes["darkyellow"] = codes["0xAAAA00"] -codes["fuscia"] = codes["fuchsia"] -codes["white"] = codes["bold"] - -codes["bg_black"] = esc_seq + "40m" -codes["bg_red"] = esc_seq + "41m" -codes["bg_green"] = esc_seq + "42m" -codes["bg_brown"] = esc_seq + "43m" -codes["bg_blue"] = esc_seq + "44m" -codes["bg_magenta"] = esc_seq + "45m" -codes["bg_cyan"] = esc_seq + "46m" -codes["bg_white"] = esc_seq + "47m" + +codes["bg_black"] = esc_seq + "40m" +codes["bg_darkred"] = esc_seq + "41m" +codes["bg_darkgreen"] = esc_seq + "42m" +codes["bg_brown"] = esc_seq + "43m" +codes["bg_darkblue"] = esc_seq + "44m" +codes["bg_purple"] = esc_seq + "45m" +codes["bg_teal"] = esc_seq + "46m" +codes["bg_lightgray"] = esc_seq + "47m" + +codes["bg_darkyellow"] = codes["bg_brown"] # Colors from /sbin/functions.sh codes["GOOD"] = codes["green"] @@ -288,7 +288,7 @@ def colorize(color_key, text): return text compat_functions_colors = ["bold","white","teal","turquoise","darkteal", - "fuscia","fuchsia","purple","blue","darkblue","green","darkgreen","yellow", + "fuchsia","purple","blue","darkblue","green","darkgreen","yellow", "brown","darkyellow","red","darkred"] def create_color_func(color_key): |