aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-05-08 00:00:09 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-05-08 00:00:09 +0000
commit56e78501ea8a55e555d77fcf4a7cb0cb16a1d171 (patch)
tree355bee1a0443ad086299754635e50a09b7cb8d6b
parent3ea7ca857e956d0076a60ad0a7ef92ea5562fe85 (diff)
downloadpaludis-56e78501ea8a55e555d77fcf4a7cb0cb16a1d171.tar.gz
paludis-56e78501ea8a55e555d77fcf4a7cb0cb16a1d171.tar.xz
Use --safe-resume by default. Use --no-safe-resume to disable.
-rw-r--r--src/clients/paludis/command_line.cc8
-rw-r--r--src/clients/paludis/command_line.hh5
-rw-r--r--src/clients/paludis/install.cc2
-rw-r--r--src/clients/paludis/paludis.cc9
4 files changed, 18 insertions, 6 deletions
diff --git a/src/clients/paludis/command_line.cc b/src/clients/paludis/command_line.cc
index f7f9b97..ff59a9f 100644
--- a/src/clients/paludis/command_line.cc
+++ b/src/clients/paludis/command_line.cc
@@ -84,7 +84,7 @@ CommandLine::CommandLine() :
a_no_config_protection(&install_args, "no-config-protection", '\0', "Disable config file protection (dangerous)"),
a_debug_build(&install_args, "debug-build", '\0'),
a_fetch(&install_args, "fetch", 'f', "Only fetch sources; don't install anything"),
- a_safe_resume(&install_args, "safe-resume", '\0', "Allow interrupted downloads to be resumed safely"),
+ a_no_safe_resume(&install_args, "no-safe-resume", '\0', "Do not allow interrupted downloads to be resumed"),
a_show_reasons(&install_args, "show-reasons", '\0', "Show why packages are being (un)installed",
args::EnumArg::EnumArgOptions
("none", "Don't show any information")
@@ -237,8 +237,10 @@ CommandLine::CommandLine() :
"Replaced by --add-to-world-spec"),
a_config_suffix(&deprecated_args, "config-suffix", 'c',
"Replaced by --environment"),
- a_update_news(&action_args_internal, "update-news", '\0',
- "No longer useful, does nothing")
+ a_update_news(&deprecated_args, "update-news", '\0',
+ "No longer useful, does nothing"),
+ a_safe_resume(&deprecated_args, "safe-resume", '\0',
+ "Now default behaviour, use --no-safe-resume to disable")
{
add_usage_line("--query [query options] target ...");
add_usage_line("--install [install options] target ...");
diff --git a/src/clients/paludis/command_line.hh b/src/clients/paludis/command_line.hh
index f1f01e9..e1b9c82 100644
--- a/src/clients/paludis/command_line.hh
+++ b/src/clients/paludis/command_line.hh
@@ -206,8 +206,8 @@ class CommandLine :
/// --fetch
paludis::args::SwitchArg a_fetch;
- /// --safe-resume
- paludis::args::SwitchArg a_safe_resume;
+ /// --no-safe-resume
+ paludis::args::SwitchArg a_no_safe_resume;
/// --show-reasons
paludis::args::EnumArg a_show_reasons;
@@ -312,6 +312,7 @@ class CommandLine :
paludis::args::StringArg a_add_to_world_atom;
paludis::args::StringArg a_config_suffix;
paludis::args::SwitchArg a_update_news;
+ paludis::args::SwitchArg a_safe_resume;
///\}
};
diff --git a/src/clients/paludis/install.cc b/src/clients/paludis/install.cc
index 3814dca..63c78aa 100644
--- a/src/clients/paludis/install.cc
+++ b/src/clients/paludis/install.cc
@@ -525,7 +525,7 @@ do_install(std::tr1::shared_ptr<Environment> env)
task.set_fetch_only(CommandLine::get_instance()->a_fetch.specified());
task.set_pretend(CommandLine::get_instance()->a_pretend.specified());
task.set_preserve_world(CommandLine::get_instance()->a_preserve_world.specified());
- task.set_safe_resume(CommandLine::get_instance()->a_safe_resume.specified());
+ task.set_safe_resume(! CommandLine::get_instance()->a_no_safe_resume.specified());
if (CommandLine::get_instance()->dl_reinstall_targets.specified())
{
diff --git a/src/clients/paludis/paludis.cc b/src/clients/paludis/paludis.cc
index 716122a..3718eb1 100644
--- a/src/clients/paludis/paludis.cc
+++ b/src/clients/paludis/paludis.cc
@@ -200,6 +200,12 @@ main(int argc, char *argv[])
CommandLine::get_instance()->a_add_to_world_spec.set_specified(true);
}
+ if (CommandLine::get_instance()->a_safe_resume.specified())
+ {
+ Log::get_instance()->message(ll_warning, lc_no_context) <<
+ "Safe resume support is now enabled by default; there is no need to pass --safe-resume";
+ }
+
/* need an action */
if (1 != (CommandLine::get_instance()->a_query.specified() +
CommandLine::get_instance()->a_version.specified() +
@@ -316,6 +322,9 @@ main(int argc, char *argv[])
paludis_command.append(" --" + CommandLine::get_instance()->a_debug_build.long_name() + " "
+ CommandLine::get_instance()->a_debug_build.argument());
+ if (CommandLine::get_instance()->a_no_safe_resume.specified())
+ paludis_command.append(" --" + CommandLine::get_instance()->a_no_safe_resume.long_name());
+
std::tr1::shared_ptr<Environment> env(EnvironmentMaker::get_instance()->make_from_spec(env_spec));
env->set_paludis_command(paludis_command);