From 3c594c5831fe42b44bd590906a3bfc3612cac455 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sun, 29 Nov 2015 14:15:19 +0000 Subject: Also export additional buildresults if the package build fails 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. --- pbuilder-buildpackage | 5 +++++ 1 file changed, 5 insertions(+) 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 -- cgit v1.2.3