aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Fernando J. Pereda <ferdy@ferdyx.org> 2007-02-22 19:12:09 +0000
committerAvatar Fernando J. Pereda <ferdy@ferdyx.org> 2007-02-22 19:12:09 +0000
commitad313c99d658de22fbec020b866b5a929e66b4ac (patch)
tree2d16f134bad11c3360dfe725c53c53d0bdb418ab
parentcc7cd342cfe60be23e691a09059124dd01d91a7b (diff)
downloadpaludis-ad313c99d658de22fbec020b866b5a929e66b4ac.tar.gz
paludis-ad313c99d658de22fbec020b866b5a929e66b4ac.tar.xz
Print the current progress to both std::cout and the xterm title stream. Fixes: ticket:111
-rw-r--r--src/clients/paludis/uninstall.cc10
-rw-r--r--src/output/console_install_task.cc17
2 files changed, 16 insertions, 11 deletions
diff --git a/src/clients/paludis/uninstall.cc b/src/clients/paludis/uninstall.cc
index 13ad0d5..97f6636 100644
--- a/src/clients/paludis/uninstall.cc
+++ b/src/clients/paludis/uninstall.cc
@@ -129,14 +129,14 @@ namespace
virtual void on_uninstall_pre(const UninstallListEntry & d)
{
- cout << endl << colour(cl_heading, "Uninstalling " +
- stringify(d.package.name) + "-" + stringify(d.package.version) +
- "::" + stringify(d.package.repository)) << endl << endl;
-
- cerr << xterm_title("(" + stringify(++_current_count) + " of " +
+ std::string msg("(" + stringify(++_current_count) + " of " +
stringify(_count) + ") Uninstalling " +
stringify(d.package.name) + "-" + stringify(d.package.version) +
"::" + stringify(d.package.repository));
+
+ cout << endl << colour(cl_heading, msg) << endl << endl;
+
+ cerr << xterm_title(msg);
}
virtual void on_uninstall_post(const UninstallListEntry &)
diff --git a/src/output/console_install_task.cc b/src/output/console_install_task.cc
index 7cae724..ed69f87 100644
--- a/src/output/console_install_task.cc
+++ b/src/output/console_install_task.cc
@@ -124,9 +124,10 @@ void
ConsoleInstallTask::on_clean_pre(const DepListEntry &,
const PackageDatabaseEntry & c)
{
- output_heading("Cleaning " + stringify(c));
- output_xterm_title("(" + stringify(count<current_count>()) + " of "
+ std::string m("(" + stringify(count<current_count>()) + " of "
+ stringify(count<max_count>()) + ") Cleaning " + stringify(c));
+ output_heading(m);
+ output_xterm_title(m);
}
void
@@ -245,9 +246,11 @@ ConsoleInstallTask::on_fetch_pre(const DepListEntry & d)
{
set_count<current_count>(count<current_count>() + 1);
- output_heading("Fetching " + stringify(d.package));
- output_xterm_title("(" + stringify(count<current_count>()) + " of "
+ std::string m("(" + stringify(count<current_count>()) + " of "
+ stringify(count<max_count>()) + ") Fetching " + stringify(d.package));
+
+ output_heading(m);
+ output_xterm_title(m);
}
void
@@ -270,9 +273,11 @@ ConsoleInstallTask::on_install_pre(const DepListEntry & d)
{
set_count<current_count>(count<current_count>() + 1);
- output_heading("Installing " + stringify(d.package));
- output_xterm_title("(" + stringify(count<current_count>()) + " of "
+ std::string m("(" + stringify(count<current_count>()) + " of "
+ stringify(count<max_count>()) + ") Installing " + stringify(d.package));
+
+ output_heading(m);
+ output_xterm_title(m);
}
void