From 70600059722511dcbcdae59a7f57f1fdff8a1f7c Mon Sep 17 00:00:00 2001 From: Junichi Uekawa Date: Sun, 27 May 2007 13:46:59 +0900 Subject: change "trap" handling so that all trap function calls are called _trap, and they will exit pbuilder after receiving a trap. --- pbuilder-createbuildenv | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'pbuilder-createbuildenv') diff --git a/pbuilder-createbuildenv b/pbuilder-createbuildenv index 313d446..8f9c835 100755 --- a/pbuilder-createbuildenv +++ b/pbuilder-createbuildenv @@ -81,7 +81,7 @@ executehooks "G" echo "Refreshing the base.tgz " echo " -> upgrading packages" mountproc -$TRAP umountproc_cleanbuildplace exit sighup +$TRAP umountproc_cleanbuildplace_trap exit sighup $CHROOTEXEC /usr/bin/apt-get update if [ -n "$REMOVEPACKAGES" ]; then $CHROOTEXEC /usr/bin/dpkg --purge $REMOVEPACKAGES @@ -95,13 +95,16 @@ executehooks "E" unloadhooks umountproc $CHROOTEXEC /usr/bin/apt-get clean || true - -$TRAP cleanbuildplace exit sighup +$TRAP cleanbuildplace_trap exit sighup # Internal_build_uml is set when --no-targz is set, this code is actually never called from pbuilder-user-mode-linux if [ ! "${INTERNAL_BUILD_UML}" = "yes" ]; then create_basetgz fi if [ "${PRESERVE_BUILDPLACE}" = "yes" ]; then - trap exit sighup + : +else + cleanbuildplace fi +trap exit sighup +exit 0 -- cgit v1.2.3