aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2015-11-29 14:15:19 +0000
committerChristopher Baines <mail@cbaines.net>2015-11-29 14:32:08 +0000
commit3c594c5831fe42b44bd590906a3bfc3612cac455 (patch)
treec51887b199c32105ac94016cc796102e036e27a6
parent2ec3e64746761eb03431d82d5c576449751618bd (diff)
downloadpbuilder-export-additional-buildresults-on-build-failure.tar
pbuilder-export-additional-buildresults-on-build-failure.tar.gz
Also export additional buildresults if the package build failsexport-additional-buildresults-on-build-failure
Additional buildresults may include files that are still generated if the package build fails. Users of pbuilder may still wish for these files to be exported. Even if any of the additional buildresults are not generated, pbuilder will not stop on the failure. As a practical use case, if the tests fail in the package build, there may be files that inform the user about the failure, which can be exported as additional buildresults such that the user can read them.
-rwxr-xr-xpbuilder-buildpackage5
1 files changed, 5 insertions, 0 deletions
diff --git a/pbuilder-buildpackage b/pbuilder-buildpackage
index 5ab7a1b..994a939 100755
--- a/pbuilder-buildpackage
+++ b/pbuilder-buildpackage
@@ -175,6 +175,11 @@ if ! wait "${BUILD_PID}"; then
trap umountproc_cleanbuildplace_trap exit sighup sigpipe
eval "${KILL_WAIT_PID}"
log.e "Failed autobuilding of package"
+ if [ -d "${BUILDRESULT}" ]; then
+ export_additional_buildresults
+ else
+ log.e "BUILDRESULT=[$BUILDRESULT] is not a directory."
+ fi
executehooks "C"
exit 1;
else