diff options
author | Daniel Baumann <daniel@debian.org> | 2012-08-27 14:43:27 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2012-08-27 14:43:27 +0200 |
commit | d7064dfb271fca5b779e18655102d2eddecd0c35 (patch) | |
tree | e077c97dd18da887c28840874925c13cf38917c1 | |
parent | 5f26aa5bd0bfab78f3bfffa72a957663c254bdd9 (diff) | |
download | vyos-live-build-d7064dfb271fca5b779e18655102d2eddecd0c35.tar.gz vyos-live-build-d7064dfb271fca5b779e18655102d2eddecd0c35.zip |
Applying patch from Colin Watson <cjwatson@ubuntu.com> to correct chroot hooks execution (Closes: #685534).
-rwxr-xr-x | scripts/build/lb_binary_hooks | 11 | ||||
-rwxr-xr-x | scripts/build/lb_chroot_hooks | 14 |
2 files changed, 14 insertions, 11 deletions
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 diff --git a/scripts/build/lb_chroot_hooks b/scripts/build/lb_chroot_hooks index 0ccfe2b32..e8a03d0f6 100755 --- a/scripts/build/lb_chroot_hooks +++ b/scripts/build/lb_chroot_hooks @@ -54,12 +54,14 @@ for _HOOK in ${LB_CHROOT_HOOKS} do for LOCATION in "${LIVE_BUILD}/hooks" /usr/share/live/build/hooks do - if [ -e "${LOCATION}/hooks/???-${_HOOK}.binary" ] - then - mkdir -p chroot/root/lb_chroot_hooks - cp "${LOCATION}"/hooks/???-"${_HOOK}".chroot chroot/root/lb_chroot_hooks - continue - fi + for FILE in "${LOCATION}"/???-"${_HOOK}".chroot + do + if [ -e "${FILE}" ] + then + mkdir -p chroot/root/lb_chroot_hooks + cp "${FILE}" chroot/root/lb_chroot_hooks + fi + done done done |