aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-11-22 20:04:31 +0000
committerMattia Rizzolo <mattia@mapreri.org>2015-11-22 20:04:31 +0000
commit91708724401f61b05f432185176066d1f5ec2ec0 (patch)
tree2c1904b59f6fd795e1460b810498872a246edeee
parentc6dcd5e516f0de7199599ff69e55cb3525e7bec6 (diff)
downloadpbuilder-91708724401f61b05f432185176066d1f5ec2ec0.tar
pbuilder-91708724401f61b05f432185176066d1f5ec2ec0.tar.gz
buildpackage: umount as the very last option, due keeping the bindmounts while executing the hooks
Closes: #805552
-rwxr-xr-xpbuilder-buildpackage9
1 files changed, 5 insertions, 4 deletions
diff --git a/pbuilder-buildpackage b/pbuilder-buildpackage
index 54cf13e..ccd7eb7 100755
--- a/pbuilder-buildpackage
+++ b/pbuilder-buildpackage
@@ -180,11 +180,7 @@ else
# build was successful
fi
-trap umountproc_cleanbuildplace_trap exit sighup sigpipe
executehooks "B"
-save_aptcache
-trap cleanbuildplace_trap exit sighup sigpipe
-umountproc
if [ -d "${BUILDRESULT}" ]; then
chown "${BUILDRESULTUID}:${BUILDRESULTGID}" "${BUILDPLACE}$BUILDDIR/"*
@@ -203,6 +199,11 @@ else
log.e "BUILDRESULT=[$BUILDRESULT] is not a directory."
fi
+# final cleanup
+trap umountproc_cleanbuildplace_trap exit sighup sigpipe
+save_aptcache
+trap cleanbuildplace_trap exit sighup sigpipe
+umountproc
:
cleanbuildplace
trap - exit sighup sigpipe