aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-08-01 19:25:13 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-08-06 10:56:04 +0100
commitbdd51f003d5c3ccebecefac9244b110051996ed2 (patch)
tree04d77a808f84ea714327ce743e644726cd90429c
parentb94fb37a104d7ed15b8fbad141439b03ad79f13e (diff)
downloadpaludis-bdd51f003d5c3ccebecefac9244b110051996ed2.tar.gz
paludis-bdd51f003d5c3ccebecefac9244b110051996ed2.tar.xz
dt_install_to_chroot
-rw-r--r--paludis/resolver/destination_types.se1
-rw-r--r--paludis/resolver/resolver_test.cc5
-rw-r--r--src/clients/cave/cmd_display_resolution.cc10
-rw-r--r--src/clients/cave/cmd_execute_resolution.cc5
-rw-r--r--src/clients/cave/resolve_common.cc15
5 files changed, 33 insertions, 3 deletions
diff --git a/paludis/resolver/destination_types.se b/paludis/resolver/destination_types.se
index 15a35e8..e982d3d 100644
--- a/paludis/resolver/destination_types.se
+++ b/paludis/resolver/destination_types.se
@@ -7,6 +7,7 @@ make_enum_DestinationType()
namespace paludis::resolver
key dt_install_to_slash "Install to the / fs"
+ key dt_install_to_chroot "Install to the chroot"
key dt_create_binary "Create a binary"
want_destringify
diff --git a/paludis/resolver/resolver_test.cc b/paludis/resolver/resolver_test.cc
index 5bd0ad2..c786d8d 100644
--- a/paludis/resolver/resolver_test.cc
+++ b/paludis/resolver/resolver_test.cc
@@ -116,7 +116,10 @@ paludis::resolver::resolver_test::make_destination_filtered_generator_fn(const G
switch (resolution->resolvent().destination_type())
{
case dt_install_to_slash:
- return g | filter::InstalledAtRoot(FSEntry("/"));
+ return g | filter::InstalledAtSlash();
+
+ case dt_install_to_chroot:
+ return g | filter::InstalledAtNotSlash();
case dt_create_binary:
throw InternalError(PALUDIS_HERE, "no dt_create_binary yet");
diff --git a/src/clients/cave/cmd_display_resolution.cc b/src/clients/cave/cmd_display_resolution.cc
index 7b6f74e..3cc4580 100644
--- a/src/clients/cave/cmd_display_resolution.cc
+++ b/src/clients/cave/cmd_display_resolution.cc
@@ -351,6 +351,10 @@ namespace
result << ", installing to /";
break;
+ case dt_install_to_chroot:
+ result << ", installing to chroot";
+ break;
+
case dt_create_binary:
result << ", creating a binary";
break;
@@ -1104,6 +1108,12 @@ namespace
++maybe_totals->installs_ct_count.insert(std::make_pair(decision.change_type(), 0)).first->second;
continue;
+ case dt_install_to_chroot:
+ c = c::blue();
+ if (maybe_totals)
+ ++maybe_totals->installs_count;
+ continue;
+
case dt_create_binary:
c = c::green();
if (maybe_totals)
diff --git a/src/clients/cave/cmd_execute_resolution.cc b/src/clients/cave/cmd_execute_resolution.cc
index 3930a77..6bb5888 100644
--- a/src/clients/cave/cmd_execute_resolution.cc
+++ b/src/clients/cave/cmd_execute_resolution.cc
@@ -777,6 +777,11 @@ namespace
action_string = "install to /";
break;
+ case dt_install_to_chroot:
+ destination_string = "installing to chroot";
+ action_string = "install to chroot";
+ break;
+
case dt_create_binary:
destination_string = "creating binary";
action_string = "create binary in ::" + stringify(install_item.destination_repository_name());
diff --git a/src/clients/cave/resolve_common.cc b/src/clients/cave/resolve_common.cc
index 6d4dbdd..fecc150 100644
--- a/src/clients/cave/resolve_common.cc
+++ b/src/clients/cave/resolve_common.cc
@@ -282,7 +282,10 @@ namespace
switch (r.destination_type())
{
case dt_install_to_slash:
- return g | filter::InstalledAtRoot(FSEntry("/"));
+ return g | filter::InstalledAtSlash();
+
+ case dt_install_to_chroot:
+ return g | filter::InstalledAtNotSlash();
case dt_create_binary:
if (binary_destinations)
@@ -996,6 +999,11 @@ namespace
continue;
break;
+ case dt_install_to_chroot:
+ if ((! (*r)->installed_root_key()) || ((*r)->installed_root_key()->value() == FSEntry("/")))
+ continue;
+ break;
+
case dt_create_binary:
if ((*r)->installed_root_key())
continue;
@@ -1029,7 +1037,10 @@ namespace
switch (resolvent.destination_type())
{
case dt_install_to_slash:
- return filter::InstalledAtRoot(FSEntry("/"));
+ return filter::InstalledAtSlash();
+
+ case dt_install_to_chroot:
+ return filter::InstalledAtNotSlash();
case dt_create_binary:
throw InternalError(PALUDIS_HERE, "no dt_create_binary yet");