Misc color fixes. Thanks to Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA@GMail...
authorZac Medico <zmedico@gentoo.org>
Fri, 6 Jul 2007 21:14:40 +0000 (21:14 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 6 Jul 2007 21:14:40 +0000 (21:14 -0000)
svn path=/main/trunk/; revision=7183

man/color.map.5
pym/emerge/__init__.py
pym/portage/output.py

index 9cd4356bcb1c6912fe56c754a738cc6aac9941f0..f1ace1c25412d8d6725940c8e937e63c3df643c9 100644 (file)
@@ -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),
index dc1df199d0a173ebbbb82166b9211fdb4d8a05aa..4bf288af57e4a82b75061db6224ed6f158ef124a 100644 (file)
@@ -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)
 
index e4db6f6ff043cb160d1fcc68052c637e99ec7aca..1dd45866dd507a61ba909020b95683fd7eae5e01 100644 (file)
@@ -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):