From 86157e4deb562e790f8924f83936d0646b7cc7c5 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sat, 26 Sep 2015 10:34:57 +0200 Subject: reproducible: set +e instead of ||true, we want to check the exit codeā€¦ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/reproducible_build.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh index 78038998..8052aaff 100755 --- a/bin/reproducible_build.sh +++ b/bin/reproducible_build.sh @@ -452,6 +452,7 @@ init_package_build() { } get_source_package() { + set +e local RESULT if [ "$MODE" != "master" ] ; then schroot --directory $TMPDIR -c source:jenkins-reproducible-$SUITE apt-get -- --download-only --only-source source ${SRCPACKAGE} 2>&1 | tee -a ${RBUILDLOG} @@ -459,7 +460,7 @@ get_source_package() { else # the build master only needs to the the .dsc file # timeout wget after 3min - schroot --directory $TMPDIR -c source:jenkins-reproducible-$SUITE apt-get -- --download-only --only-source --print-uris source ${SRCPACKAGE} | grep \.dsc|cut -d " " -f1|xargs timeout -k 3m 3m wget || true + schroot --directory $TMPDIR -c source:jenkins-reproducible-$SUITE apt-get -- --download-only --only-source --print-uris source ${SRCPACKAGE} | grep \.dsc|cut -d " " -f1|xargs timeout -k 3m 3m wget RESULT=$? fi PARSED_RESULT=$(egrep 'E: Failed to fetch.*(Unable to connect to|Connection failed|Size mismatch|Cannot initiate the connection to|Bad Gateway)' ${RBUILDLOG} || true) @@ -475,11 +476,12 @@ get_source_package() { RESULT=$? else # the build master only needs to the the .dsc file - schroot --directory $TMPDIR -c source:jenkins-reproducible-$SUITE apt-get -- --download-only --only-source --print-uris source ${SRCPACKAGE} | grep \.dsc|cut -d " " -f1|xargs timeout -k 3m 3m wget || true + schroot --directory $TMPDIR -c source:jenkins-reproducible-$SUITE apt-get -- --download-only --only-source --print-uris source ${SRCPACKAGE} | grep \.dsc|cut -d " " -f1|xargs timeout -k 3m 3m wget RESULT=$? fi PARSED_RESULT=$(egrep 'E: Failed to fetch.*(Unable to connect to|Connection failed|Size mismatch|Cannot initiate the connection to|Bad Gateway)' ${RBUILDLOG} || true) fi + set -e if [ $RESULT != 0 ] || [ "$(ls ${SRCPACKAGE}_*.dsc 2> /dev/null)" = "" ] || [ ! -z "$PARSED_RESULT" ] ; then if [ "$MODE" = "master" ] ; then handle_404 -- cgit v1.2.3-70-g09d2