aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-05-01 11:40:06 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-05-01 11:40:06 +0000
commitb9ede38a9e42299e14f1480bdf57683e6e8b75c0 (patch)
tree2436ab2900e81f2352135024512020ec5467e578
parent838ddf6bd1e977f65cd16096d8fb5331b7355172 (diff)
downloadpaludis-b9ede38a9e42299e14f1480bdf57683e6e8b75c0.tar.gz
paludis-b9ede38a9e42299e14f1480bdf57683e6e8b75c0.tar.xz
Don't add to world if --fetch is specified.
-rw-r--r--src/install.cc43
1 files changed, 22 insertions, 21 deletions
diff --git a/src/install.cc b/src/install.cc
index 29d98e8..591ce59 100644
--- a/src/install.cc
+++ b/src/install.cc
@@ -61,6 +61,26 @@ do_install()
p::DepList dep_list(env);
+ dep_list.set_drop_self_circular(CommandLine::get_instance()->a_dl_drop_self_circular.specified());
+ dep_list.set_drop_circular(CommandLine::get_instance()->a_dl_drop_circular.specified());
+ dep_list.set_drop_all(CommandLine::get_instance()->a_dl_drop_all.specified());
+ dep_list.set_ignore_installed(CommandLine::get_instance()->a_dl_ignore_installed.specified());
+ dep_list.set_recursive_deps(! CommandLine::get_instance()->a_dl_no_recursive_deps.specified());
+ dep_list.set_max_stack_depth(CommandLine::get_instance()->a_dl_max_stack_depth.argument());
+
+ if (CommandLine::get_instance()->a_dl_rdepend_post.argument() == "always")
+ dep_list.set_rdepend_post(p::dlro_always);
+ else if (CommandLine::get_instance()->a_dl_rdepend_post.argument() == "never")
+ dep_list.set_rdepend_post(p::dlro_never);
+ else
+ dep_list.set_rdepend_post(p::dlro_as_needed);
+
+ p::InstallOptions opts(false, false);
+ if (CommandLine::get_instance()->a_no_config_protection.specified())
+ opts.set<p::io_noconfigprotect>(true);
+ if (CommandLine::get_instance()->a_fetch.specified())
+ opts.set<p::io_fetchonly>(true);
+
try
{
CommandLine::ParametersIterator q(CommandLine::get_instance()->begin_parameters()),
@@ -99,7 +119,8 @@ do_install()
if (had_set_targets)
dep_list.set_reinstall(false);
- else if (! CommandLine::get_instance()->a_pretend.specified())
+ else if ((! CommandLine::get_instance()->a_pretend.specified()) &&
+ (! opts.get<p::io_fetchonly>()))
if (! CommandLine::get_instance()->a_preserve_world.specified())
env->add_appropriate_to_world(targets);
}
@@ -116,20 +137,6 @@ do_install()
return 1;
}
- dep_list.set_drop_self_circular(CommandLine::get_instance()->a_dl_drop_self_circular.specified());
- dep_list.set_drop_circular(CommandLine::get_instance()->a_dl_drop_circular.specified());
- dep_list.set_drop_all(CommandLine::get_instance()->a_dl_drop_all.specified());
- dep_list.set_ignore_installed(CommandLine::get_instance()->a_dl_ignore_installed.specified());
- dep_list.set_recursive_deps(! CommandLine::get_instance()->a_dl_no_recursive_deps.specified());
- dep_list.set_max_stack_depth(CommandLine::get_instance()->a_dl_max_stack_depth.argument());
-
- if (CommandLine::get_instance()->a_dl_rdepend_post.argument() == "always")
- dep_list.set_rdepend_post(p::dlro_always);
- else if (CommandLine::get_instance()->a_dl_rdepend_post.argument() == "never")
- dep_list.set_rdepend_post(p::dlro_never);
- else
- dep_list.set_rdepend_post(p::dlro_as_needed);
-
try
{
dep_list.add(targets);
@@ -268,12 +275,6 @@ do_install()
return return_code;
}
- p::InstallOptions opts(false, false);
- if (CommandLine::get_instance()->a_no_config_protection.specified())
- opts.set<p::io_noconfigprotect>(true);
- if (CommandLine::get_instance()->a_fetch.specified())
- opts.set<p::io_fetchonly>(true);
-
if (opts.get<p::io_fetchonly>())
env->perform_hook("fetch_all_pre");
else