summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-06-28 05:26:22 +0000
committerMike Frysinger <vapier@gentoo.org>2006-06-28 05:26:22 +0000
commitaea4618b7471f0009acb0a74428e64062f722d45 (patch)
tree8e0285791d4a5d952892bcbd593d4b6730d58fea
parent34029d9faf77dd4f92f1c6964caae3a0790c33e5 (diff)
downloadportage-aea4618b7471f0009acb0a74428e64062f722d45.tar.gz
portage-aea4618b7471f0009acb0a74428e64062f722d45.tar.bz2
portage-aea4618b7471f0009acb0a74428e64062f722d45.zip
retain current color schema by adding a new color class for unmerging
svn path=/main/trunk/; revision=3681
-rwxr-xr-xbin/emerge12
-rw-r--r--pym/output.py5
2 files changed, 10 insertions, 7 deletions
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$")