From: Mike Frysinger Date: Wed, 28 Jun 2006 05:26:22 +0000 (-0000) Subject: retain current color schema by adding a new color class for unmerging X-Git-Tag: v2.1.1~359 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=aea4618b7471f0009acb0a74428e64062f722d45;p=portage.git retain current color schema by adding a new color class for unmerging svn path=/main/trunk/; revision=3681 --- diff --git a/bin/emerge b/bin/emerge index 9c90eff10..6c8f17fd5 100755 --- a/bin/emerge +++ b/bin/emerge @@ -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'") + \ diff --git a/pym/output.py b/pym/output.py index b3004ba23..87382774a 100644 --- a/pym/output.py +++ b/pym/output.py @@ -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$")