diff options
author | Junichi Uekawa <dancer@dancer64.netfort.gr.jp> | 2007-05-27 13:46:59 +0900 |
---|---|---|
committer | Junichi Uekawa <dancer@dancer64.netfort.gr.jp> | 2007-05-27 13:46:59 +0900 |
commit | 70600059722511dcbcdae59a7f57f1fdff8a1f7c (patch) | |
tree | 8281eb127612ddadeabb4b25bef90db01798569b /pbuilder-buildpackage | |
parent | 7fbaa9928c327998c452c9500f8ae14c1ddfbd39 (diff) | |
download | pbuilder-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-buildpackage')
-rwxr-xr-x | pbuilder-buildpackage | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/pbuilder-buildpackage b/pbuilder-buildpackage index 4121c62..a71ff60 100755 --- a/pbuilder-buildpackage +++ b/pbuilder-buildpackage @@ -52,7 +52,7 @@ export HOME="/tmp/buildd" echobacktime extractbuildplace -trap umountproc_cleanbuildplace exit sighup +trap umountproc_cleanbuildplace_trap exit sighup loadhooks if [ ! -d "${BUILDRESULT}" ]; then @@ -89,10 +89,10 @@ recover_aptcache createbuilduser echo "Installing the build-deps" executehooks "D" -trap saveaptcache_umountproc_cleanbuildplace exit sighup +trap saveaptcache_umountproc_cleanbuildplace_trap exit sighup checkbuilddep "$PACKAGENAME" save_aptcache -trap umountproc_cleanbuildplace exit sighup +trap umountproc_cleanbuildplace_trap exit sighup echo "Copying source file" copydsc "$PACKAGENAME" "$BUILDPLACE/tmp/buildd" @@ -139,7 +139,7 @@ else fi if ! wait ${BUILD_PID}; then - trap umountproc_cleanbuildplace exit sighup + trap umountproc_cleanbuildplace_trap exit sighup eval "${KILL_WAIT_PID}" echo "pbuilder: Failed autobuilding of package" >&2 executehooks "C" @@ -149,10 +149,10 @@ else # build was successful fi -trap umountproc_cleanbuildplace exit sighup +trap umountproc_cleanbuildplace_trap exit sighup executehooks "B" save_aptcache -trap cleanbuildplace exit sighup +trap cleanbuildplace_trap exit sighup umountproc @@ -164,4 +164,7 @@ else echo "E: BUILDRESULT=[$BUILDRESULT] is not a directory." >&2 fi +cleanbuildplace +trap exit sighup echobacktime +exit 0 |