aboutsummaryrefslogtreecommitdiff
path: root/src/clients/cave
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-10-17 16:42:25 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-10-17 16:42:25 +0100
commit207326c91fa5ad7b74993299eec54608ca1ae93b (patch)
tree21c48151968a760e233170f1918e63ae497b28fb /src/clients/cave
parent94257d3c2335ce1ccadf5c2d73f42a4bc67e96c3 (diff)
downloadpaludis-207326c91fa5ad7b74993299eec54608ca1ae93b.tar.gz
paludis-207326c91fa5ad7b74993299eec54608ca1ae93b.tar.xz
cave resolve --dependencies-to-slash
Fixes: ticket:994
Diffstat (limited to 'src/clients/cave')
-rw-r--r--src/clients/cave/cmd_resolve_cmdline.cc9
-rw-r--r--src/clients/cave/cmd_resolve_cmdline.hh1
-rw-r--r--src/clients/cave/resolve_common.cc24
3 files changed, 34 insertions, 0 deletions
diff --git a/src/clients/cave/cmd_resolve_cmdline.cc b/src/clients/cave/cmd_resolve_cmdline.cc
index e61e88ea4..8735c4f30 100644
--- a/src/clients/cave/cmd_resolve_cmdline.cc
+++ b/src/clients/cave/cmd_resolve_cmdline.cc
@@ -259,6 +259,15 @@ ResolveCommandLineResolutionOptions::ResolveCommandLineResolutionOptions(args::A
"create a binary package and use that for the install. May be specified multiple times. If this option "
"is not specified, a package will be built multiple times for multiple destinations"),
#endif
+ a_dependencies_to_slash(&g_destination_options, "dependencies-to-slash", '/', "Specify what to do with "
+ "dependencies for the / filesystem when not working on /. By default, all dependencies are installed "
+ "to /.",
+ args::EnumArg::EnumArgOptions
+ ("all", 'a', "Send all dependencies to /")
+ ("runtime", 'r', "Send only runtime dependencies to /")
+ ("build", 'b', "Send only build dependencies to /")
+ ("none", 'n', "Don't send dependencies to / at all"),
+ "all"),
// g_query_options(this, "Query Options", "Query the user interactively when making decisions. "
// "If only --query is specified, prompt for everything. Otherwise, prompt only for the specified decisions."),
diff --git a/src/clients/cave/cmd_resolve_cmdline.hh b/src/clients/cave/cmd_resolve_cmdline.hh
index 5728d011a..aa6e76f81 100644
--- a/src/clients/cave/cmd_resolve_cmdline.hh
+++ b/src/clients/cave/cmd_resolve_cmdline.hh
@@ -99,6 +99,7 @@ namespace paludis
#ifdef ENABLE_PBINS
args::StringSetArg a_via_binary;
#endif
+ args::EnumArg a_dependencies_to_slash;
// args::ArgsGroup g_query_options;
// args::SwitchArg a_query;
diff --git a/src/clients/cave/resolve_common.cc b/src/clients/cave/resolve_common.cc
index fc902c52d..5bc23a5c8 100644
--- a/src/clients/cave/resolve_common.cc
+++ b/src/clients/cave/resolve_common.cc
@@ -788,6 +788,30 @@ paludis::cave::resolve_common(
throw args::DoHelp("Don't understand argument '" + resolution_options.a_slots.argument() + "' to '--"
+ resolution_options.a_slots.long_name() + "'");
+ if (resolution_options.a_dependencies_to_slash.argument() == "all")
+ {
+ get_resolvents_for_helper.set_want_dependencies_on_slash(true);
+ get_resolvents_for_helper.set_want_runtime_dependencies_on_slash(true);
+ }
+ else if (resolution_options.a_dependencies_to_slash.argument() == "runtime")
+ {
+ get_resolvents_for_helper.set_want_dependencies_on_slash(false);
+ get_resolvents_for_helper.set_want_runtime_dependencies_on_slash(true);
+ }
+ else if (resolution_options.a_dependencies_to_slash.argument() == "build")
+ {
+ get_resolvents_for_helper.set_want_dependencies_on_slash(true);
+ get_resolvents_for_helper.set_want_runtime_dependencies_on_slash(false);
+ }
+ else if (resolution_options.a_dependencies_to_slash.argument() == "none")
+ {
+ get_resolvents_for_helper.set_want_dependencies_on_slash(false);
+ get_resolvents_for_helper.set_want_runtime_dependencies_on_slash(false);
+ }
+ else
+ throw args::DoHelp("Don't understand argument '" + resolution_options.a_dependencies_to_slash.argument() + "' to '--"
+ + resolution_options.a_dependencies_to_slash.long_name() + "'");
+
if (resolution_options.a_target_slots.argument() == "best-or-installed")
get_resolvents_for_helper.set_target_slots(true, false, true);
else if (resolution_options.a_target_slots.argument() == "installed-or-best")