aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-11-22 18:48:03 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-11-22 18:48:03 +0000
commit30bef260190fd8a1488bce7d9e99338dbe2d1198 (patch)
tree82a5c464b1825eba1c73774390e2bad89270e360
parent9768eb21b32470ad8375845ccad6a35d1bfaa405 (diff)
downloadpaludis-30bef260190fd8a1488bce7d9e99338dbe2d1198.tar.gz
paludis-30bef260190fd8a1488bce7d9e99338dbe2d1198.tar.xz
Show adding to slot differently
-rw-r--r--paludis/resolver/change_type.se1
-rw-r--r--paludis/resolver/decider.cc9
-rw-r--r--src/clients/cave/cmd_display_resolution-fmt.hh3
-rwxr-xr-xsrc/clients/cave/cmd_display_resolution.cc7
4 files changed, 19 insertions, 1 deletions
diff --git a/paludis/resolver/change_type.se b/paludis/resolver/change_type.se
index 3648b24..006a9dc 100644
--- a/paludis/resolver/change_type.se
+++ b/paludis/resolver/change_type.se
@@ -9,6 +9,7 @@ make_enum_ChangeType()
key ct_downgrade "It's a downgrade"
key ct_reinstall "It's a reinstall"
key ct_upgrade "It's an upgrade"
+ key ct_add_to_slot "We're adding a new version to an existing slot (binaries)"
key ct_slot_new "It's a new slot, but other slots are installed"
key ct_new "It's new"
diff --git a/paludis/resolver/decider.cc b/paludis/resolver/decider.cc
index 1920c6e..9b323f5 100644
--- a/paludis/resolver/decider.cc
+++ b/paludis/resolver/decider.cc
@@ -453,14 +453,21 @@ Decider::_make_change_type_for(
{
if (decision.destination()->replacing()->empty())
{
- const std::shared_ptr<const PackageIDSequence> others((*_imp->env)[selection::SomeArbitraryVersion(
+ const std::shared_ptr<const PackageIDSequence> others((*_imp->env)[selection::AllVersionsUnsorted(
generator::Package(decision.origin_id()->name()) &
generator::InRepository(decision.destination()->repository())
)]);
if (others->empty())
return ct_new;
else
+ {
+ for (auto o(others->begin()), o_end(others->end()) ;
+ o != o_end ; ++o)
+ if (_same_slot(*o, decision.origin_id()))
+ return ct_add_to_slot;
+
return ct_slot_new;
+ }
}
else
{
diff --git a/src/clients/cave/cmd_display_resolution-fmt.hh b/src/clients/cave/cmd_display_resolution-fmt.hh
index 41c8262..7a63210 100644
--- a/src/clients/cave/cmd_display_resolution-fmt.hh
+++ b/src/clients/cave/cmd_display_resolution-fmt.hh
@@ -137,6 +137,9 @@ const auto fs_change_type_new = make_format_string_fetcher("display-resolution/c
const auto fs_change_type_slot_new = make_format_string_fetcher("display-resolution/change_type_slot_new", 1)
<< param<'c'>() << param<'s'>() << c::bold_blue();
+const auto fs_change_type_add_to_slot = make_format_string_fetcher("display-resolution/change_type_add_to_slot", 1)
+ << param<'c'>() << param<'s'>() << c::blue();
+
const auto fs_change_type_upgrade = make_format_string_fetcher("display-resolution/change_type_upgrade", 1)
<< param<'c'>() << param<'s'>() << c::blue();
diff --git a/src/clients/cave/cmd_display_resolution.cc b/src/clients/cave/cmd_display_resolution.cc
index 5a29bec..6d7c091 100755
--- a/src/clients/cave/cmd_display_resolution.cc
+++ b/src/clients/cave/cmd_display_resolution.cc
@@ -1192,6 +1192,9 @@ namespace
case ct_slot_new:
cout << fuc(fs_change_type_slot_new(), fv<'c'>(c), fv<'s'>(x.replace(x.find('X'), 1, "s")));
continue;
+ case ct_add_to_slot:
+ cout << fuc(fs_change_type_add_to_slot(), fv<'c'>(c), fv<'s'>(x.replace(x.find('X'), 1, "v")));
+ continue;
case ct_upgrade:
cout << fuc(fs_change_type_upgrade(), fv<'c'>(c), fv<'s'>(x.replace(x.find('X'), 1, "u")));
continue;
@@ -1679,6 +1682,10 @@ namespace
kind = "new slot installs";
break;
+ case ct_add_to_slot:
+ kind = "adding to slot";
+ break;
+
case ct_upgrade:
kind = "upgrades";
break;