[Qa-jenkins-scm] [jenkins.debian.net] 03/05: reproducible: set +e instead of ||true, we want to check the exit code…

Holger Levsen holger at moszumanska.debian.org
Sat Sep 26 09:03:01 UTC 2015


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit 86157e4deb562e790f8924f83936d0646b7cc7c5
Author: Holger Levsen <holger at layer-acht.org>
Date:   Sat Sep 26 10:34:57 2015 +0200

    reproducible: set +e instead of ||true, we want to check the exit code…
---
 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 7803899..8052aaf 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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list