aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-02-04 03:25:50 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-02-04 03:25:50 +0000
commitb6f7ab0efa52e66ab9989d1cad5ae9380893e551 (patch)
treee670ac90a03147d8489eec6e6297fe571ccc971b
parent3ef47f233d579b338cb5e757ee73a3c9382c87ed (diff)
downloadpaludis-b6f7ab0efa52e66ab9989d1cad5ae9380893e551.tar.gz
paludis-b6f7ab0efa52e66ab9989d1cad5ae9380893e551.tar.xz
More xtermy goodness
-rw-r--r--paludis/install_task.cc8
-rw-r--r--paludis/install_task.hh7
-rw-r--r--src/output/console_install_task.cc23
-rw-r--r--src/output/console_install_task.hh7
4 files changed, 43 insertions, 2 deletions
diff --git a/paludis/install_task.cc b/paludis/install_task.cc
index c6fcf8c..2244613 100644
--- a/paludis/install_task.cc
+++ b/paludis/install_task.cc
@@ -402,16 +402,24 @@ InstallTask::_pretend()
bool pretend_failed(false);
+ on_pretend_all_pre();
+
SupportsActionTest<PretendAction> pretend_action_query;
for (DepList::Iterator dep(_imp->dep_list.begin()), dep_end(_imp->dep_list.end()) ;
dep != dep_end ; ++dep)
if (dep->package_id->supports_action(pretend_action_query))
{
+ on_pretend_pre(*dep);
+
PretendAction pretend_action;
dep->package_id->perform_action(pretend_action);
pretend_failed |= pretend_action.failed();
+
+ on_pretend_post(*dep);
}
+ on_pretend_all_post();
+
if (_imp->pretend)
{
if (0 != perform_hook(Hook("install_pretend_post")
diff --git a/paludis/install_task.hh b/paludis/install_task.hh
index d9145d7..89d49d9 100644
--- a/paludis/install_task.hh
+++ b/paludis/install_task.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006, 2007 Ciaran McCreesh
+ * Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -142,6 +142,11 @@ namespace paludis
virtual void on_not_continuing_due_to_errors() = 0;
+ virtual void on_pretend_all_pre() = 0;
+ virtual void on_pretend_pre(const DepListEntry &) = 0;
+ virtual void on_pretend_post(const DepListEntry &) = 0;
+ virtual void on_pretend_all_post() = 0;
+
virtual void on_fetch_all_pre() = 0;
virtual void on_fetch_pre(const DepListEntry &, const int x, const int y, const int s, const int f) = 0;
virtual void on_fetch_post(const DepListEntry &, const int x, const int y, const int s, const int f) = 0;
diff --git a/src/output/console_install_task.cc b/src/output/console_install_task.cc
index 054a856..f922faf 100644
--- a/src/output/console_install_task.cc
+++ b/src/output/console_install_task.cc
@@ -214,6 +214,7 @@ void
ConsoleInstallTask::on_build_deplist_pre()
{
output_activity_start_message("Building dependency list");
+ output_xterm_title("Building dependency list");
}
void
@@ -385,6 +386,28 @@ ConsoleInstallTask::on_display_merge_list_entry(const DepListEntry & d)
}
void
+ConsoleInstallTask::on_pretend_all_pre()
+{
+}
+
+void
+ConsoleInstallTask::on_pretend_pre(const DepListEntry & d)
+{
+ std::string m("Pretending for " + stringify(*d.package_id));
+ output_xterm_title(m);
+}
+
+void
+ConsoleInstallTask::on_pretend_post(const DepListEntry &)
+{
+}
+
+void
+ConsoleInstallTask::on_pretend_all_post()
+{
+}
+
+void
ConsoleInstallTask::on_fetch_all_pre()
{
}
diff --git a/src/output/console_install_task.hh b/src/output/console_install_task.hh
index 35e2fcf..538c6bf 100644
--- a/src/output/console_install_task.hh
+++ b/src/output/console_install_task.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006, 2007 Ciaran McCreesh
+ * Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -144,6 +144,11 @@ namespace paludis
virtual void on_not_continuing_due_to_errors();
virtual void on_display_merge_list_entry(const DepListEntry &);
+ virtual void on_pretend_all_pre();
+ virtual void on_pretend_pre(const DepListEntry &);
+ virtual void on_pretend_post(const DepListEntry &);
+ virtual void on_pretend_all_post();
+
virtual void on_fetch_all_pre();
virtual void on_fetch_pre(const DepListEntry &, const int x, const int y, const int s, const int f);
virtual void on_fetch_post(const DepListEntry &, const int x, const int y, const int s, const int f);