aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-02 11:16:37 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-02 11:17:13 +0100
commitf33949bb24f7aa9d72787c51bfa63eb009aff727 (patch)
treeebc5c499497887023b7a5ee66e332731e345b869
parent7956d702dc36bd7f0bcfdc3d0cc31bea513240d6 (diff)
downloadpaludis-f33949bb24f7aa9d72787c51bfa63eb009aff727.tar.gz
paludis-f33949bb24f7aa9d72787c51bfa63eb009aff727.tar.xz
Show binaries in green
-rw-r--r--src/clients/cave/cmd_display_resolution.cc32
1 files changed, 26 insertions, 6 deletions
diff --git a/src/clients/cave/cmd_display_resolution.cc b/src/clients/cave/cmd_display_resolution.cc
index 037ab25..ce51099 100644
--- a/src/clients/cave/cmd_display_resolution.cc
+++ b/src/clients/cave/cmd_display_resolution.cc
@@ -768,9 +768,29 @@ namespace
const std::string & notes,
ChoicesToExplain & choices_to_explain)
{
- std::string x("X");
+ std::string x("X"), c;
if (! decision.best())
x = "-" + x;
+
+ do
+ {
+ switch (resolution->resolvent().destination_type())
+ {
+ case dt_install_to_slash:
+ continue;
+
+ case dt_create_binary:
+ c = c::green();
+ continue;
+
+ case last_dt:
+ break;
+ }
+
+ throw InternalError(PALUDIS_HERE, "bad destination_type. huh?");
+ }
+ while (false);
+
if (untaken)
x = "(" + x + ")";
@@ -782,19 +802,19 @@ namespace
switch (decision.change_type())
{
case ct_new:
- cout << x.replace(x.find('X'), 1, "n") << c::bold_blue();
+ cout << c << x.replace(x.find('X'), 1, "n") << c::bold_blue();
continue;
case ct_slot_new:
- cout << x.replace(x.find('X'), 1, "s") << c::bold_blue();
+ cout << c << x.replace(x.find('X'), 1, "s") << c::bold_blue();
continue;
case ct_upgrade:
- cout << x.replace(x.find('X'), 1, "u") << c::blue();
+ cout << c << x.replace(x.find('X'), 1, "u") << c::blue();
continue;
case ct_reinstall:
- cout << x.replace(x.find('X'), 1, "r") << c::yellow();
+ cout << c << x.replace(x.find('X'), 1, "r") << c::yellow();
continue;
case ct_downgrade:
- cout << x.replace(x.find('X'), 1, "d") << c::bold_yellow();
+ cout << c << x.replace(x.find('X'), 1, "d") << c::bold_yellow();
continue;
case last_ct:
break;