diff options
author | Holger Levsen <holger@layer-acht.org> | 2014-09-24 01:02:59 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2014-09-24 01:02:59 +0200 |
commit | f70e6c46f873812ca6a63a2b56a8175df5e80448 (patch) | |
tree | 3c49194569bf50aeb6884fadad3b125d9412c699 /bin | |
parent | e87fe7be08cb07a481c200802bbe4f93053506fd (diff) | |
download | jenkins.debian.net-f70e6c46f873812ca6a63a2b56a8175df5e80448.tar.xz |
reproducible: deal gracefully with build failures
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_build.sh | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh index 0244ee14..1926554c 100755 --- a/bin/reproducible_build.sh +++ b/bin/reproducible_build.sh @@ -22,29 +22,30 @@ BAD="" for PACKAGE in "$@" ; do let "COUNT_TOTAL=COUNT_TOTAL+1" rm b1 b2 -rf - apt-get source --download-only ${PACKAGE} - sudo pbuilder --build --basetgz /var/cache/pbuilder/base-reproducible.tgz ${PACKAGE}_*.dsc - mkdir b1 b2 - dcmd cp /var/cache/pbuilder/result/${PACKAGE}_*.changes b1 - sudo dcmd rm /var/cache/pbuilder/result/${PACKAGE}_*.changes - sudo pbuilder --build --basetgz /var/cache/pbuilder/base-reproducible.tgz ${PACKAGE}_*.dsc - dcmd cp /var/cache/pbuilder/result/${PACKAGE}_*.changes b2 - sudo dcmd rm /var/cache/pbuilder/result/${PACKAGE}_*.changes - cat b1/${PACKAGE}_*.changes - TMPFILE=$(mktemp) - ./misc.git/diffp b1/*.changes b2/*.changes | tee ${TMPFILE} - if $(grep -qv '^\*\*\*\*\*' ${TMPFILE}) ; then - figlet ${PACKAGE} - echo - echo "${PACKAGE} build successfull." - let "COUNT_GOOD=COUNT_GOOD+1" - GOOD="${PACKAGE} ${GOOD}" - else - echo "Warning: ${PACKAGE} failed to build reproducible." - let "COUNT_BAD=COUNT_BAD+1" - GOOD="${PACKAGE} ${BAD}" + apt-get source --download-only ${PACKAGE} || true + if $(sudo pbuilder --build --basetgz /var/cache/pbuilder/base-reproducible.tgz ${PACKAGE}_*.dsc) ; then + mkdir b1 b2 + dcmd cp /var/cache/pbuilder/result/${PACKAGE}_*.changes b1 + sudo dcmd rm /var/cache/pbuilder/result/${PACKAGE}_*.changes + sudo pbuilder --build --basetgz /var/cache/pbuilder/base-reproducible.tgz ${PACKAGE}_*.dsc + dcmd cp /var/cache/pbuilder/result/${PACKAGE}_*.changes b2 + sudo dcmd rm /var/cache/pbuilder/result/${PACKAGE}_*.changes + cat b1/${PACKAGE}_*.changes + TMPFILE=$(mktemp) + ./misc.git/diffp b1/*.changes b2/*.changes | tee ${TMPFILE} + if $(grep -qv '^\*\*\*\*\*' ${TMPFILE}) ; then + figlet ${PACKAGE} + echo + echo "${PACKAGE} build successfull." + let "COUNT_GOOD=COUNT_GOOD+1" + GOOD="${PACKAGE} ${GOOD}" + else + echo "Warning: ${PACKAGE} failed to build reproducible." + let "COUNT_BAD=COUNT_BAD+1" + GOOD="${PACKAGE} ${BAD}" + fi + rm b1 b2 ${TMPFILE} -rf fi - rm b1 b2 ${TMPFILE} -rf echo "==============================================================" echo "$COUNT_TOTAL of ${#@} done." |