aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-09-10 23:49:52 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-09-10 23:49:52 +0100
commitd7a61b8159897493072273e0705eb5d0b7ae406b (patch)
treec314dca0aebcd85e91917227a9af031a0dc2cff7
parentcc49aa1881778f51108bfc11d730552ef9f890cb (diff)
downloadpaludis-d7a61b8159897493072273e0705eb5d0b7ae406b.tar.gz
paludis-d7a61b8159897493072273e0705eb5d0b7ae406b.tar.xz
Progress notifier for pretends
-rw-r--r--src/clients/cave/cmd_execute_resolution.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/clients/cave/cmd_execute_resolution.cc b/src/clients/cave/cmd_execute_resolution.cc
index 9aa8c3a..15b7fb1 100644
--- a/src/clients/cave/cmd_execute_resolution.cc
+++ b/src/clients/cave/cmd_execute_resolution.cc
@@ -112,6 +112,10 @@ namespace
const std::tr1::shared_ptr<const PackageID> id(c->if_package_id());
Context context("When pretending for '" + stringify(*id) + "':");
+ if (x > 1)
+ std::cout << std::string(stringify(x - 1).length() + stringify(y).length() + 4, '\010');
+ std::cout << x << " of " << y << std::flush;
+
std::string command(cmdline.program_options.a_perform_program.argument());
if (command.empty())
command = "$CAVE perform";
@@ -221,10 +225,14 @@ namespace
).max_exit_status())
throw ActionError("Aborted by hook");
+ std::cout << "Executing pretend actions: " << std::flush;
+
for (Resolutions::ConstIterator c(lists.ordered()->begin()), c_end(lists.ordered()->end()) ;
c != c_end ; ++c)
retcode |= do_pretend(env, cmdline, (*c)->decision(), ++x, y);
+ std::cout << std::endl;
+
if (0 != env->perform_hook(Hook("pretend_all_post")
("TARGETS", join(cmdline.begin_parameters(), cmdline.end_parameters(), " "))
).max_exit_status())