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-23 15:17:06 +0000
commit6b5f689a9a5254ab95a447cbc20a234021de9854 (patch)
tree76fc5232b663dae4020ab02b7bac5c31b1a3cc9b
parent19df1558a25729bc466b57f143f5bbe4c174c066 (diff)
downloadpaludis-6b5f689a9a5254ab95a447cbc20a234021de9854.tar.gz
paludis-6b5f689a9a5254ab95a447cbc20a234021de9854.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 3648b24ec..006a9dc4b 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 dacbe015e..0711389fe 100644
--- a/paludis/resolver/decider.cc
+++ b/paludis/resolver/decider.cc
@@ -452,14 +452,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 befcad84a..938de5c4e 100644
--- a/src/clients/cave/cmd_display_resolution-fmt.hh
+++ b/src/clients/cave/cmd_display_resolution-fmt.hh
@@ -125,6 +125,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 612c58590..29f37fb0d 100755
--- a/src/clients/cave/cmd_display_resolution.cc
+++ b/src/clients/cave/cmd_display_resolution.cc
@@ -1143,6 +1143,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;
@@ -1630,6 +1633,10 @@ namespace
kind = "new slot installs";
break;
+ case ct_add_to_slot:
+ kind = "adding to slot";
+ break;
+
case ct_upgrade:
kind = "upgrades";
break;