aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-01-01 18:47:21 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-01-01 18:47:21 +0000
commite67c71d6420e9e47b57a3eb3b9f4859e4efb6f29 (patch)
tree9d71bd08e3f00e08f0dcdd2b2b0097fba075234b
parentc4e44dcc589a7640a949d2e804ae46e220c8b471 (diff)
downloadpaludis-e67c71d6420e9e47b57a3eb3b9f4859e4efb6f29.tar.gz
paludis-e67c71d6420e9e47b57a3eb3b9f4859e4efb6f29.tar.xz
Make the exec work for set targets too
-rw-r--r--paludis/tasks/install_task.cc12
-rw-r--r--paludis/tasks/install_task.hh2
-rw-r--r--src/clients/paludis/install.cc3
3 files changed, 17 insertions, 0 deletions
diff --git a/paludis/tasks/install_task.cc b/paludis/tasks/install_task.cc
index 64747d0..d9aeac6 100644
--- a/paludis/tasks/install_task.cc
+++ b/paludis/tasks/install_task.cc
@@ -469,3 +469,15 @@ InstallTask::on_installed_paludis()
{
}
+bool
+InstallTask::had_set_targets() const
+{
+ return _imp->had_set_targets;
+}
+
+bool
+InstallTask::had_package_targets() const
+{
+ return _imp->had_package_targets;
+}
+
diff --git a/paludis/tasks/install_task.hh b/paludis/tasks/install_task.hh
index 63be13e..fec2f47 100644
--- a/paludis/tasks/install_task.hh
+++ b/paludis/tasks/install_task.hh
@@ -96,6 +96,8 @@ namespace paludis
void add_target(const std::string &);
void clear();
+ bool had_set_targets() const;
+ bool had_package_targets() const;
typedef libwrapiter::ForwardIterator<InstallTask, const std::string> TargetsIterator;
TargetsIterator begin_targets() const;
diff --git a/src/clients/paludis/install.cc b/src/clients/paludis/install.cc
index b05b55b..4d8f59f 100644
--- a/src/clients/paludis/install.cc
+++ b/src/clients/paludis/install.cc
@@ -76,6 +76,9 @@ namespace
if (CommandLine::get_instance()->a_add_to_world_atom.specified())
resume_command = resume_command + " --" + CommandLine::get_instance()->a_add_to_world_atom.long_name()
+ " '" + CommandLine::get_instance()->a_add_to_world_atom.argument() + "'";
+ else if (task.had_set_targets())
+ resume_command = resume_command + " --" + CommandLine::get_instance()->a_add_to_world_atom.long_name()
+ + " '( )'";
else
resume_command = resume_command + " --" + CommandLine::get_instance()->a_add_to_world_atom.long_name()
+ " '( " + join(task.begin_targets(), task.end_targets(), " ") + " )'";