aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-12-30 16:26:04 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-12-30 16:26:04 +0000
commit8665cc6dcfcbd84d09c9e84133b72c3df7d15040 (patch)
tree0c73b520ea80044baf5e00d97d05cc3d1e0c59ac
parentf56d126aa339a2b1ce88a996fa4d50d5bfc98f12 (diff)
downloadpaludis-8665cc6dcfcbd84d09c9e84133b72c3df7d15040.tar.gz
paludis-8665cc6dcfcbd84d09c9e84133b72c3df7d15040.tar.xz
Add --dl-deps-default. Use it for resume command.
-rw-r--r--src/clients/paludis/command_line.cc4
-rw-r--r--src/clients/paludis/command_line.hh2
-rw-r--r--src/clients/paludis/install.cc19
-rw-r--r--src/common_args/deps_option_arg.cc3
4 files changed, 21 insertions, 7 deletions
diff --git a/src/clients/paludis/command_line.cc b/src/clients/paludis/command_line.cc
index d7a333d..0b141fc 100644
--- a/src/clients/paludis/command_line.cc
+++ b/src/clients/paludis/command_line.cc
@@ -121,6 +121,10 @@ CommandLine::CommandLine() :
("as-needed", "As needed"),
"always"),
+ dl_deps_default(&dl_args, "dl-deps-default", '\0',
+ "Override default behaviour for all dependency classes",
+ static_cast<DepListDepsOption>(-1)),
+
dl_installed_deps_pre(&dl_args, "dl-installed-deps-pre", '\0',
"How to handle pre dependencies for installed packages",
dl_deps_discard),
diff --git a/src/clients/paludis/command_line.hh b/src/clients/paludis/command_line.hh
index 2408c0c..3fa6f32 100644
--- a/src/clients/paludis/command_line.hh
+++ b/src/clients/paludis/command_line.hh
@@ -224,6 +224,8 @@ class CommandLine :
paludis::args::EnumArg dl_reinstall_scm;
paludis::args::EnumArg dl_upgrade;
+ paludis::args::DepsOptionArg dl_deps_default;
+
paludis::args::DepsOptionArg dl_installed_deps_pre;
paludis::args::DepsOptionArg dl_installed_deps_runtime;
paludis::args::DepsOptionArg dl_installed_deps_post;
diff --git a/src/clients/paludis/install.cc b/src/clients/paludis/install.cc
index 951f04f..f0dbbe2 100644
--- a/src/clients/paludis/install.cc
+++ b/src/clients/paludis/install.cc
@@ -112,13 +112,7 @@ namespace
if (task.current_dep_list_entry() != task.dep_list().end())
{
std::string resume_command = DefaultEnvironment::get_instance()->paludis_command() + " "
- "--dl-installed-deps-pre discard "
- "--dl-installed-deps-runtime discard "
- "--dl-installed-deps-post discard "
- "--dl-uninstalled-deps-pre discard "
- "--dl-uninstalled-deps-runtime discard "
- "--dl-uninstalled-deps-post discard "
- "--install --preserve-world";
+ "--dl-deps-default discard --install --preserve-world";
for (DepList::Iterator i(task.current_dep_list_entry()), i_end(task.dep_list().end()) ;
i != i_end ; ++i)
if (! i->skip_install)
@@ -269,6 +263,17 @@ do_install()
throw args::DoHelp("bad value for --dl-fall-back");
}
+ if (CommandLine::get_instance()->dl_deps_default.specified())
+ {
+ DepListDepsOption x(CommandLine::get_instance()->dl_deps_default.option());
+ options.installed_deps_pre = x;
+ options.installed_deps_post = x;
+ options.installed_deps_runtime = x;
+ options.uninstalled_deps_pre = x;
+ options.uninstalled_deps_post = x;
+ options.uninstalled_deps_runtime = x;
+ }
+
if (CommandLine::get_instance()->dl_installed_deps_pre.specified())
options.installed_deps_pre = enum_arg_to_dep_list_deps_option(
CommandLine::get_instance()->dl_installed_deps_pre);
diff --git a/src/common_args/deps_option_arg.cc b/src/common_args/deps_option_arg.cc
index fd8d9ff..1dde171 100644
--- a/src/common_args/deps_option_arg.cc
+++ b/src/common_args/deps_option_arg.cc
@@ -27,6 +27,9 @@ namespace
{
std::string def_to_string(const DepListDepsOption d)
{
+ if (-1 == d)
+ return "none";
+
switch (d)
{
case dl_deps_discard: