summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_build.sh
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-04-06 17:30:12 +0200
committerHolger Levsen <holger@layer-acht.org>2015-04-18 17:20:09 +0200
commit542c249a49943fd15f3566105e05116b15e18531 (patch)
tree519f3b4586acd476c7f3671126bebffe6a2c1bf6 /bin/reproducible_build.sh
parenta51c8ceb659ab2225a8fdd76197358337363b12d (diff)
downloadjenkins.debian.net-542c249a49943fd15f3566105e05116b15e18531.tar.xz
reproducible: build: refactor: make a local variable in call_debbindiff() to avoid pollute the global env
Diffstat (limited to 'bin/reproducible_build.sh')
-rwxr-xr-xbin/reproducible_build.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 32f48596..9f2bf03c 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 ..