aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2008-01-22 01:25:42 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2008-01-22 01:25:42 +0000
commit66704a9a841d861bd97d339237915296cf6f5e3b (patch)
tree42b4334beae77f424766e7febb8698a6ff627cd1
parent8ed98c406675c8ff01381633c4e41ade4c96360e (diff)
downloadpaludis-66704a9a841d861bd97d339237915296cf6f5e3b.tar.gz
paludis-66704a9a841d861bd97d339237915296cf6f5e3b.tar.xz
Don't show the resume command if there were masks/blockers/etc.
-rwxr-xr-xhooks/demos/pretend_resume.bash.in1
-rw-r--r--paludis/install_task.cc14
2 files changed, 11 insertions, 4 deletions
diff --git a/hooks/demos/pretend_resume.bash.in b/hooks/demos/pretend_resume.bash.in
index 7c2003b..84c77a9 100755
--- a/hooks/demos/pretend_resume.bash.in
+++ b/hooks/demos/pretend_resume.bash.in
@@ -12,6 +12,7 @@
# You should ensure that it has execute permissions.
[[ ${RESUME_COMMAND} = *" '="* ]] || exit 0
+${DEPLIST_HAS_ERRORS} && exit 0
echo
template_var=$(tr '[[:lower:]]' '[[:upper:]]' <<<"${PALUDIS_CLIENT}")_CMDLINE_resume_command_template
diff --git a/paludis/install_task.cc b/paludis/install_task.cc
index bbc33f4..cc4d196 100644
--- a/paludis/install_task.cc
+++ b/paludis/install_task.cc
@@ -258,8 +258,11 @@ InstallTask::_display_task_list()
Context context("When displaying task list:");
if (_imp->pretend &&
- 0 != perform_hook(Hook("install_pretend_pre")("TARGETS", join(_imp->raw_targets.begin(),
- _imp->raw_targets.end(), " "))).max_exit_status)
+ 0 != perform_hook(Hook("install_pretend_pre")
+ ("TARGETS", join(
+ _imp->raw_targets.begin(), _imp->raw_targets.end(), " "))
+ ("DEPLIST_HAS_ERRORS", stringify(_imp->dep_list.has_errors()))
+ ).max_exit_status)
throw InstallActionError("Pretend install aborted by hook");
on_display_merge_list_pre();
@@ -410,8 +413,11 @@ InstallTask::_pretend()
if (_imp->pretend)
{
- if (0 != perform_hook(Hook("install_pretend_post")("TARGETS", join(
- _imp->raw_targets.begin(), _imp->raw_targets.end(), " "))).max_exit_status)
+ if (0 != perform_hook(Hook("install_pretend_post")
+ ("TARGETS", join(
+ _imp->raw_targets.begin(), _imp->raw_targets.end(), " "))
+ ("DEPLIST_HAS_ERRORS", stringify(_imp->dep_list.has_errors()))
+ ).max_exit_status)
throw InstallActionError("Pretend install aborted by hook");
}