retain current color schema by adding a new color class for unmerging
authorMike Frysinger <vapier@gentoo.org>
Wed, 28 Jun 2006 05:26:22 +0000 (05:26 -0000)
committerMike Frysinger <vapier@gentoo.org>
Wed, 28 Jun 2006 05:26:22 +0000 (05:26 -0000)
svn path=/main/trunk/; revision=3681

bin/emerge
pym/output.py

index 9c90eff1097195bed6407dec13325566bbb0fa0f..6c8f17fd5dbe5a36fde47d703770281f6e4a4ea2 100755 (executable)
@@ -251,7 +251,7 @@ def countdown(secs=5, doing="Starting"):
                ticks=range(secs)
                ticks.reverse()
                for sec in ticks:
-                       sys.stdout.write(colorize("WARN", str(sec+1)+" "))
+                       sys.stdout.write(colorize("UNMERGE_WARN", str(sec+1)+" "))
                        sys.stdout.flush()
                        time.sleep(1)
                print
@@ -2084,12 +2084,12 @@ def unmerge_overlapping(pkg_key, myroot, mysettings, vartree):
                        ommitted_versions = "none"
                portage.writemsg_stdout("\n %s\n" % bold(mycp), noiselevel=-1)
                portage.writemsg_stdout("selected: ".rjust(14) + \
-                       colorize("WARN", selected_versions) + "\n", noiselevel=-1)
+                       colorize("UNMERGE_WARN", selected_versions) + "\n", noiselevel=-1)
                portage.writemsg_stdout("protected: ".rjust(14) + \
                        colorize("GOOD", protected_version) + "\n", noiselevel=-1)
                portage.writemsg_stdout("omitted: ".rjust(14) + \
                        colorize("GOOD", ommitted_versions) + "\n", noiselevel=-1)
-               portage.writemsg_stdout("\n>>>" + colorize("WARN", "'Selected'") + \
+               portage.writemsg_stdout("\n>>>" + colorize("UNMERGE_WARN", "'Selected'") + \
                        " packages are slated for removal.\n", noiselevel=0)
                portage.writemsg_stdout(">>>" + colorize("GOOD", "'Protected'") + \
                        " and " + colorize("GOOD", "'omitted'") + \
@@ -2296,7 +2296,7 @@ def unmerge(settings, myopts, vartree, unmerge_action, unmerge_files,
                        print yellow("\a!!! Unmerging it may be damaging to your system.\n")
                        if "--pretend" not in myopts and "--ask" not in myopts:
                                countdown(int(settings["EMERGE_WARNING_DELAY"]),
-                                       colorize("WARN", "Press Ctrl-C to Stop"))
+                                       colorize("UNMERGE_WARN", "Press Ctrl-C to Stop"))
                print "\n "+white(x)
                for mytype in ["selected","protected","omitted"]:
                        print string.rjust(mytype,12)+":",
@@ -2308,14 +2308,14 @@ def unmerge(settings, myopts, vartree, unmerge_action, unmerge_files,
                                        else:
                                                myversion=mysplit[2]+"-"+mysplit[3]
                                        if mytype=="selected":
-                                               portage.writemsg_stdout(colorize("WARN", myversion))
+                                               portage.writemsg_stdout(colorize("UNMERGE_WARN", myversion))
                                        else:
                                                portage.writemsg_stdout(colorize("GOOD", myversion))
                        else:
                                        print "none",
                        print
 
-       portage.writemsg_stdout("\n>>> " + colorize("WARN", "'Selected'") + \
+       portage.writemsg_stdout("\n>>> " + colorize("UNMERGE_WARN", "'Selected'") + \
                " packages are slated for removal.\n")
        portage.writemsg_stdout(">>> " + colorize("GOOD", "'Protected'") + \
                        " and " + colorize("GOOD", "'omitted'") + \
index b3004ba23dd549f01dc25df8deb6a5eee34c1ead..87382774a1a9a5206c049e18fe469f1d7a0e492d 100644 (file)
@@ -118,11 +118,14 @@ codes["white"]      = codes["bold"]
 
 # Colors from /sbin/functions.sh
 codes["GOOD"]       = codes["green"]
-codes["WARN"]       = codes["red"]
+codes["WARN"]       = codes["yellow"]
 codes["BAD"]        = codes["red"]
 codes["HILITE"]     = codes["teal"]
 codes["BRACKET"]    = codes["blue"]
 
+# Portage functions
+codes["UNMERGE_WARN"] = codes["red"]
+
 def parse_color_map():
        myfile = COLOR_MAP_FILE
        ansi_code_pattern = re.compile("^[0-9;]*m$")