aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunichi Uekawa <dancer@dancer64.netfort.gr.jp>2007-05-27 13:29:36 +0900
committerJunichi Uekawa <dancer@dancer64.netfort.gr.jp>2007-05-27 13:29:36 +0900
commit7fbaa9928c327998c452c9500f8ae14c1ddfbd39 (patch)
tree2df54e5fd8693957e6c1e2c96da1aa889617bff0
parent9d94da70bdec6aac1bcc9747e746f8afabbb962c (diff)
downloadpbuilder-7fbaa9928c327998c452c9500f8ae14c1ddfbd39.tar
pbuilder-7fbaa9928c327998c452c9500f8ae14c1ddfbd39.tar.gz
trap sighup as well as exit: create/update
-rw-r--r--ChangeLog3
-rwxr-xr-xpbuilder-createbuildenv4
-rwxr-xr-xpbuilder-updatebuildenv8
3 files changed, 9 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 0a30246..95ed0ab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2007-05-27 Junichi Uekawa <dancer@debian.org>
+ * pbuilder-createbuildenv:
+ * pbuilder-updatebuildenv: trap sighup as well as exit.
+
* pdebuild.1: document the new behavior.
* pdebuild: create ../pkg_ver_arch.build file per default,
diff --git a/pbuilder-createbuildenv b/pbuilder-createbuildenv
index e2cb2d6..313d446 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
+$TRAP umountproc_cleanbuildplace exit sighup
$CHROOTEXEC /usr/bin/apt-get update
if [ -n "$REMOVEPACKAGES" ]; then
$CHROOTEXEC /usr/bin/dpkg --purge $REMOVEPACKAGES
@@ -96,7 +96,7 @@ unloadhooks
umountproc
$CHROOTEXEC /usr/bin/apt-get clean || true
-$TRAP cleanbuildplace exit
+$TRAP cleanbuildplace 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
diff --git a/pbuilder-updatebuildenv b/pbuilder-updatebuildenv
index f079ce2..d6abe49 100755
--- a/pbuilder-updatebuildenv
+++ b/pbuilder-updatebuildenv
@@ -32,7 +32,7 @@ else
fi
extractbuildplace
-$TRAP umountproc_cleanbuildplace exit
+$TRAP umountproc_cleanbuildplace exit sighup
loadhooks
echo "Refreshing the base.tgz "
@@ -43,7 +43,7 @@ if [ -n "$REMOVEPACKAGES" ]; then
fi
recover_aptcache
-$TRAP saveaptcache_umountproc_cleanbuildplace exit
+$TRAP saveaptcache_umountproc_cleanbuildplace exit sighup
$CHROOTEXEC /usr/bin/apt-get -y --force-yes "${FORCE_CONFNEW[@]}" dist-upgrade
$CHROOTEXEC /usr/bin/apt-get -y --force-yes install build-essential dpkg-dev apt $EXTRAPACKAGES
save_aptcache
@@ -62,14 +62,14 @@ if [ "${AUTOCLEANAPTCACHE}" = "yes" -a -n "$APTCACHE" ]; then
done
fi
-$TRAP umountproc_cleanbuildplace exit
+$TRAP umountproc_cleanbuildplace exit sighup
executehooks "E"
unloadhooks
umountproc
$CHROOTEXEC /usr/bin/apt-get clean || true
-$TRAP cleanbuildplace exit
+$TRAP cleanbuildplace exit sighup
if [ ! "${INTERNAL_BUILD_UML}" = "yes" ]; then
create_basetgz
fi