[Qa-jenkins-scm] [jenkins.debian.net] 03/04: reproducible: build: refactor: make a local variable in call_debbindiff() to avoid pollute the global env

Holger Levsen holger at moszumanska.debian.org
Sat Apr 18 15:57:29 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 542c249a49943fd15f3566105e05116b15e18531
Author: Mattia Rizzolo <mattia at mapreri.org>
Date:   Mon Apr 6 17:30:12 2015 +0200

    reproducible: build: refactor: make  a local variable in call_debbindiff() to avoid pollute the global env
---
 bin/reproducible_build.sh | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 32f4859..9f2bf03 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -180,9 +180,9 @@ init_debbindiff() {
 }
 
 dbd_timeout() {
-	local msg="DBDVERSION was killed after running into timeout after ${TIMEOUT}"
+	local msg="DBDVERSION was killed after running into timeout after $1"
 	if [ ! -s ./${DBDREPORT} ] ; then
-		echo "$(date) - $DBDVERSION produced no output and was killed after running into timeout after $TIMEOUT..." >> ${DBDREPORT}
+		echo "$(date) - $DBDVERSION produced no output and was killed after running into timeout after ${1}..." >> ${DBDREPORT}
 	else
 		local msg="$msg, but there is still $REPRODUCIBLE_URL/dbd/$SUITE/$ARCH/$DDBREPORT"
 	fi
@@ -194,7 +194,7 @@ call_debbindiff() {
 	init_debbindiff  # check and set up locks for chroot
 	local TMPLOG=(mktemp --tmpdir=$PWD)
 	echo | tee -a ${RBUILDLOG}
-	TIMEOUT="30m"  # don't forget to also change the "seq 0 200" loop 17 lines above
+	local TIMEOUT="30m"  # don't forget to also change the "seq 0 200" loop 17 lines above
 	DBDVERSION="$(schroot --directory /tmp -c source:jenkins-reproducible-unstable-debbindiff debbindiff -- --version 2>&1)"
 	echo "$(date) - $DBDVERSION will be used to compare the two builds now." | tee -a ${RBUILDLOG}
 	set -x
@@ -222,7 +222,7 @@ call_debbindiff() {
 			handle_ftbr "$DBDVERSION had trouble comparing the two builds. Please investigate $REPRODUCIBLE_URL/rbuild/${SUITE}/${ARCH}/${SRCPACKAGE}_${EVERSION}.rbuild.log"
 			;;
 		124)
-			dbd_timeout
+			dbd_timeout $TIMEOUT
 			;;
 		*)
 			handle_ftbr "Something weird with $DBDVERSION (exit with $RESULT) happened and I don't know how to handle it"
@@ -383,7 +383,7 @@ cat ${SRCPACKAGE}_${EVERSION}.dsc | tee -a ${RBUILDLOG}
 check_suitability
 build_rebuild  # defines FTBFS, RBUILDLOG
 if [ $FTBFS -eq 0 ] ; then
-	call_debbindiff
+	call_debbindiff  # defines DBDVERSION
 fi
 
 cd ..

-- 
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