summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorReiner Herrmann <reiner@reiner-h.de>2015-01-25 21:52:19 +0100
committerHolger Levsen <holger@layer-acht.org>2015-01-25 22:48:48 +0100
commit99f79ab74922c24f956693718c3374ba5a77dd8d (patch)
treef4492ea9ac224aaa1b5c8e6ce6bbe565428eaa4b /bin
parentba4ba12e90901ccee17970135baa2276d4daf525 (diff)
downloadjenkins.debian.net-99f79ab74922c24f956693718c3374ba5a77dd8d.tar.xz
Check also if second build failed.
It can happen that the first build was successful, but the second build not (e.g. because of failing tests, which has already been observed). In this case, the whole build has to be marked FTBFS and debbindiff doesn't need to be called.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_build.sh19
1 files changed, 12 insertions, 7 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 03f6b5bb..892c0c81 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -180,6 +180,7 @@ else
set +e
set -x
NUM_CPU=$(cat /proc/cpuinfo |grep ^processor|wc -l)
+ FTBFS=1
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}
set +x
@@ -197,13 +198,17 @@ else
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
set +x
- dcmd cp /var/cache/pbuilder/result/${SRCPACKAGE}_${EVERSION}_amd64.changes b2
- # and again (see comment 5 lines above)
- sudo dcmd rm /var/cache/pbuilder/result/${SRCPACKAGE}_${EVERSION}.dsc
- sudo dcmd rm /var/cache/pbuilder/result/${SRCPACKAGE}_${EVERSION}_amd64.changes
- cat b1/${SRCPACKAGE}_${EVERSION}_amd64.changes | tee -a ${RBUILDLOG}
- call_debbindiff
- else
+ if [ -f /var/cache/pbuilder/result/${SRCPACKAGE}_${EVERSION}_amd64.changes ] ; then
+ FTBFS=0
+ dcmd cp /var/cache/pbuilder/result/${SRCPACKAGE}_${EVERSION}_amd64.changes b2
+ # and again (see comment 5 lines above)
+ sudo dcmd rm /var/cache/pbuilder/result/${SRCPACKAGE}_${EVERSION}.dsc
+ sudo dcmd rm /var/cache/pbuilder/result/${SRCPACKAGE}_${EVERSION}_amd64.changes
+ cat b1/${SRCPACKAGE}_${EVERSION}_amd64.changes | tee -a ${RBUILDLOG}
+ call_debbindiff
+ fi
+ fi
+ if [ $FTBFS -eq 1 ] ; then
set +x
echo "${SRCPACKAGE} failed to build from source."
sqlite3 -init $INIT ${PACKAGES_DB} "REPLACE INTO source_packages VALUES (\"${SRCPACKAGE}\", \"${VERSION}\", \"FTBFS\", \"$DATE\")"