Bug#520251: pbuilder: Pbuilder does not umount bindmounts when ssh connection dies
Junichi Uekawa
dancer at netfort.gr.jp
Wed Mar 18 14:10:57 UTC 2009
applied to Git.
At Wed, 18 Mar 2009 12:46:18 +0100,
Stefan Fritsch wrote:
>
> diff -Nru /tmp/Clyhun1xsU/pbuilder-0.181x1/pbuilder-buildpackage /tmp/LAaYdkTAGv/pbuilder-0.181x2/pbuilder-buildpackage
> --- pbuilder-0.181x1/pbuilder-buildpackage 2007-05-28 13:37:29.000000000 +0200
> +++ pbuilder-0.181x2/pbuilder-buildpackage 2009-03-18 11:50:00.000000000 +0100
> @@ -52,7 +52,7 @@
>
> echobacktime
> extractbuildplace
> -trap umountproc_cleanbuildplace_trap exit sighup
> +trap umountproc_cleanbuildplace_trap exit sighup sigpipe
> loadhooks
>
> if [ ! -d "${BUILDRESULT}" ]; then
> @@ -89,10 +89,10 @@
> createbuilduser
> echo "Installing the build-deps"
> executehooks "D"
> -trap saveaptcache_umountproc_cleanbuildplace_trap exit sighup
> +trap saveaptcache_umountproc_cleanbuildplace_trap exit sighup sigpipe
> checkbuilddep "$PACKAGENAME"
> save_aptcache
> -trap umountproc_cleanbuildplace_trap exit sighup
> +trap umountproc_cleanbuildplace_trap exit sighup sigpipe
>
> echo "Copying source file"
> copydsc "$PACKAGENAME" "$BUILDPLACE/tmp/buildd"
> @@ -139,7 +139,7 @@
> fi
>
> if ! wait ${BUILD_PID}; then
> - trap umountproc_cleanbuildplace_trap exit sighup
> + trap umountproc_cleanbuildplace_trap exit sighup sigpipe
> eval "${KILL_WAIT_PID}"
> echo "pbuilder: Failed autobuilding of package" >&2
> executehooks "C"
> @@ -149,10 +149,10 @@
> # build was successful
> fi
>
> -trap umountproc_cleanbuildplace_trap exit sighup
> +trap umountproc_cleanbuildplace_trap exit sighup sigpipe
> executehooks "B"
> save_aptcache
> -trap cleanbuildplace_trap exit sighup
> +trap cleanbuildplace_trap exit sighup sigpipe
> umountproc
>
>
> @@ -166,6 +166,6 @@
>
> :
> cleanbuildplace
> -trap - exit sighup
> +trap - exit sighup sigpipe
> echobacktime
> exit 0
> diff -Nru /tmp/Clyhun1xsU/pbuilder-0.181x1/pbuilder-modules /tmp/LAaYdkTAGv/pbuilder-0.181x2/pbuilder-modules
> --- pbuilder-0.181x1/pbuilder-modules 2008-05-08 17:49:07.000000000 +0200
> +++ pbuilder-0.181x2/pbuilder-modules 2009-03-18 11:50:39.000000000 +0100
> @@ -464,23 +464,31 @@
>
> # all trap hooks that should lead to 'exit'; and error exit.
> function cleanbuildplace_trap () {
> + trap "" sigpipe sighup
> + set +e
> cleanbuildplace
> - trap - exit sighup
> + trap - exit sighup sigpipe
> exit 1
> }
> function saveaptcache_umountproc_cleanbuildplace_trap () {
> + trap "" sigpipe sighup
> + set +e
> saveaptcache_umountproc_cleanbuildplace
> - trap - exit sighup
> + trap - exit sighup sigpipe
> exit 1
> }
> function umountproc_cleanbuildplace_trap () {
> + trap "" sigpipe sighup
> + set +e
> umountproc_cleanbuildplace
> - trap - exit sighup
> + trap - exit sighup sigpipe
> exit 1
> }
> function umountproc_trap () {
> + trap "" sigpipe sighup
> + set +e
> umountproc
> - trap - exit sighup
> + trap - exit sighup sigpipe
> exit 1
> }
>
More information about the Pbuilder-maint
mailing list