From 99f79ab74922c24f956693718c3374ba5a77dd8d Mon Sep 17 00:00:00 2001 From: Reiner Herrmann Date: Sun, 25 Jan 2015 21:52:19 +0100 Subject: 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. --- bin/reproducible_build.sh | 19 ++++++++++++------- 1 file 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\")" -- cgit v1.2.3-70-g09d2