From d7064dfb271fca5b779e18655102d2eddecd0c35 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 27 Aug 2012 14:43:27 +0200 Subject: Applying patch from Colin Watson to correct chroot hooks execution (Closes: #685534). --- scripts/build/lb_binary_hooks | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'scripts/build/lb_binary_hooks') diff --git a/scripts/build/lb_binary_hooks b/scripts/build/lb_binary_hooks index 07cf4577c..97faa3077 100755 --- a/scripts/build/lb_binary_hooks +++ b/scripts/build/lb_binary_hooks @@ -43,17 +43,18 @@ Create_lockfile .lock # Running hooks for _HOOK in ${LB_BINARY_HOOKS} do - for LOCATION in "${LIVE_BUILD}/hooks" /usr/share/live/build/hooks + for LOCATION in "${LIVE_BUILD}/hooks" /usr/share/live/build/hooks + do + for FILE in "${LOCATION}"/???-"${_HOOK}".binary do - if [ -e "${LOCATION}/hooks/???-${_HOOK}.binary" ] + if [ -e "${FILE}" ] then cd binary - ./"${LOCATION}/hooks/???-${_HOOK}.binary" || { Echo_error "${_HOOK} failed (exit non-zero). You should check for errors."; exit 1 ;} + ./"${FILE}" || { Echo_error "${_HOOK} failed (exit non-zero). You should check for errors."; exit 1 ;} cd "${OLDPWD}" - - continue fi done + done done ## Processing local hooks -- cgit v1.2.3