From 74a7af6571930eb0a89cdd7140a6663a3ff60645 Mon Sep 17 00:00:00 2001
From: Daniel Baumann <daniel@debian.org>
Date: Wed, 2 Sep 2009 20:50:17 +0200
Subject: Adding a message about which hook made a build fail, if any.

---
 helpers/lh_binary_local-hooks | 2 +-
 helpers/lh_chroot_hooks       | 2 +-
 helpers/lh_chroot_local-hooks | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/helpers/lh_binary_local-hooks b/helpers/lh_binary_local-hooks
index 6d4beaf..fbc99e5 100755
--- a/helpers/lh_binary_local-hooks
+++ b/helpers/lh_binary_local-hooks
@@ -49,7 +49,7 @@ then
 		fi
 
 		# Executing hook
-		./"${HOOK}"
+		./"${HOOK}" || ( Echo_error "${HOOK} failed (exit non-zero). You should check for errors."; exit 1 )
 	done
 
 	# Creating stage file
diff --git a/helpers/lh_chroot_hooks b/helpers/lh_chroot_hooks
index 4884898..4821d46 100755
--- a/helpers/lh_chroot_hooks
+++ b/helpers/lh_chroot_hooks
@@ -54,7 +54,7 @@ do
 		fi
 
 		# Executing hook
-		Chroot chroot "./root/${HOOK}"
+		Chroot chroot "./root/${HOOK}" || ( Echo_error "${HOOK} failed (exit non-zero). You should check for errors."; exit 1 )
 
 		# Removing hook
 		rm -f chroot/root/"${HOOK}"
diff --git a/helpers/lh_chroot_local-hooks b/helpers/lh_chroot_local-hooks
index f5fcceb..878becb 100755
--- a/helpers/lh_chroot_local-hooks
+++ b/helpers/lh_chroot_local-hooks
@@ -52,7 +52,7 @@ then
 		fi
 
 		# Executing hook
-		Chroot chroot "/root/$(basename ${HOOK})"
+		Chroot chroot "/root/$(basename ${HOOK})" || ( Echo_error "${HOOK} failed (exit non-zero). You should check for errors."; exit 1 )
 
 		# Removing hook
 		rm -f chroot/root/"$(basename ${HOOK})"
-- 
cgit v1.0