summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorReiner Herrmann <reiner@reiner-h.de>2015-01-25 23:21:09 +0100
committerHolger Levsen <holger@layer-acht.org>2015-01-25 23:32:07 +0100
commitc7cbb9183ca2958fefc497ea2e92c8fbad5a6cbe (patch)
tree1658371a17ae6f9af99db27ad06c9a77242f6e7b /bin
parent99f79ab74922c24f956693718c3374ba5a77dd8d (diff)
downloadjenkins.debian.net-c7cbb9183ca2958fefc497ea2e92c8fbad5a6cbe.tar.xz
Use log of second build if it fails
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_build.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 892c0c81..e291e2f5 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -181,8 +181,9 @@ else
set -x
NUM_CPU=$(cat /proc/cpuinfo |grep ^processor|wc -l)
FTBFS=1
+ TMPLOG=$(mktemp)
printf "BUILDUSERID=1111\nBUILDUSERNAME=pbuilder1\n" > $TMPCFG
- ( timeout 12h nice ionice -c 3 sudo DEB_BUILD_OPTIONS="parallel=$NUM_CPU" pbuilder --build --configfile $TMPCFG --debbuildopts "-b" --basetgz /var/cache/pbuilder/base-reproducible.tgz --distribution sid ${SRCPACKAGE}_*.dsc ) 2>&1 | tee -a ${RBUILDLOG}
+ ( timeout 12h nice ionice -c 3 sudo DEB_BUILD_OPTIONS="parallel=$NUM_CPU" pbuilder --build --configfile $TMPCFG --debbuildopts "-b" --basetgz /var/cache/pbuilder/base-reproducible.tgz --distribution sid ${SRCPACKAGE}_*.dsc ) 2>&1 | tee ${TMPLOG}
set +x
if [ -f /var/cache/pbuilder/result/${SRCPACKAGE}_${EVERSION}_amd64.changes ] ; then
mkdir b1 b2
@@ -196,7 +197,7 @@ else
echo "Re-building ${SRCPACKAGE} now."
echo "============================================================================="
set -x
- timeout 12h nice ionice -c 3 sudo DEB_BUILD_OPTIONS="parallel=$NUM_CPU" LANG="fr_CH.UTF-8" LC_ALL="fr_CH.UTF-8" unshare --uts -- /usr/sbin/pbuilder --build --configfile $TMPCFG --hookdir /etc/pbuilder/rebuild-hooks --debbuildopts "-b" --basetgz /var/cache/pbuilder/base-reproducible.tgz --distribution sid ${SRCPACKAGE}_${EVERSION}.dsc
+ ( timeout 12h nice ionice -c 3 sudo DEB_BUILD_OPTIONS="parallel=$NUM_CPU" LANG="fr_CH.UTF-8" LC_ALL="fr_CH.UTF-8" unshare --uts -- /usr/sbin/pbuilder --build --configfile $TMPCFG --hookdir /etc/pbuilder/rebuild-hooks --debbuildopts "-b" --basetgz /var/cache/pbuilder/base-reproducible.tgz --distribution sid ${SRCPACKAGE}_${EVERSION}.dsc ) 2>&1 | tee -a ${RBUILDLOG}
set +x
if [ -f /var/cache/pbuilder/result/${SRCPACKAGE}_${EVERSION}_amd64.changes ] ; then
FTBFS=0
@@ -206,8 +207,13 @@ else
sudo dcmd rm /var/cache/pbuilder/result/${SRCPACKAGE}_${EVERSION}_amd64.changes
cat b1/${SRCPACKAGE}_${EVERSION}_amd64.changes | tee -a ${RBUILDLOG}
call_debbindiff
+ else
+ echo "The second build failed, even though the first build was successful." | tee -a ${RBUILDLOG}
fi
+ else
+ cat ${TMPLOG} >> ${RBUILDLOG}
fi
+ rm ${TMPLOG}
if [ $FTBFS -eq 1 ] ; then
set +x
echo "${SRCPACKAGE} failed to build from source."