aboutsummaryrefslogtreecommitdiff
path: root/pbuilder-createbuildenv
diff options
context:
space:
mode:
authorJunichi Uekawa <dancer@dancer64.netfort.gr.jp>2007-05-27 13:46:59 +0900
committerJunichi Uekawa <dancer@dancer64.netfort.gr.jp>2007-05-27 13:46:59 +0900
commit70600059722511dcbcdae59a7f57f1fdff8a1f7c (patch)
tree8281eb127612ddadeabb4b25bef90db01798569b /pbuilder-createbuildenv
parent7fbaa9928c327998c452c9500f8ae14c1ddfbd39 (diff)
downloadpbuilder-70600059722511dcbcdae59a7f57f1fdff8a1f7c.tar
pbuilder-70600059722511dcbcdae59a7f57f1fdff8a1f7c.tar.gz
change "trap" handling so that all trap function calls are called _trap, and they will exit pbuilder after receiving a trap.
Diffstat (limited to 'pbuilder-createbuildenv')
-rwxr-xr-xpbuilder-createbuildenv11
1 files changed, 7 insertions, 4 deletions
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