From abecdded93a8a9c3aeb79ec595c3ada74b929a9e Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Mon, 6 Apr 2015 00:11:02 +0200 Subject: reproducible: build: refactor: gather more or less generic+useful env variables in a single place --- bin/reproducible_build.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh index b7ed13f3..22b35312 100755 --- a/bin/reproducible_build.sh +++ b/bin/reproducible_build.sh @@ -82,9 +82,6 @@ print_out_duration() { } call_debbindiff() { - DBDREPORT=$(ls ${SRCPACKAGE}_${EVERSION}.dsc) - DBDREPORT=$(echo ${DBDREPORT%.dsc}.debbindiff.html) - BUILDINFO=${SRCPACKAGE}_${EVERSION}_${ARCH}.buildinfo # the schroot for debbindiff gets updated once a day. wait patiently if that's the case if [ -f $DBDCHROOT_WRITELOCK ] || [ -f $DBDCHROOT_READLOCK ] ; then for i in $(seq 0 200) ; do # this loop also exists in _common.sh and _setup_pbuilder.sh @@ -183,10 +180,6 @@ choose_package () { echo "=============================================================================" echo "Trying to reproducibly build ${SRCPACKAGE} in ${SUITE} on ${ARCH} now.$AANOUNCE" echo "=============================================================================" - set -x - DATE=$(date +'%Y-%m-%d %H:%M') - START=$(date +'%s') - DURATION=0 # mark build attempt sqlite3 -init $INIT ${PACKAGES_DB} "REPLACE INTO schedule (package_id, date_scheduled, date_build_started) VALUES ('$SRCPKGID', '$SCHEDULED_DATE', '$DATE');" @@ -195,7 +188,14 @@ TMPCFG=$(mktemp -t pbuilderrc_XXXX) trap cleanup_all INT TERM EXIT cd $TMPDIR - RBUILDLOG=/var/lib/jenkins/userContent/rbuild/${SUITE}/${ARCH}/${SRCPACKAGE}_None.rbuild.log +# global variables (this is what we expect, at least. if something goes wrong, then something failed) +RBUILDLOG=/var/lib/jenkins/userContent/rbuild/${SUITE}/${ARCH}/${SRCPACKAGE}_None.rbuild.log +DBDREPORT=$(echo ${SRCPACKAGE}_${EVERSION}.debbindiff.html) +BUILDINFO=${SRCPACKAGE}_${EVERSION}_${ARCH}.buildinfo +DATE=$(date +'%Y-%m-%d %H:%M') +START=$(date +'%s') + + choose_package echo "Starting to build ${SRCPACKAGE}/${SUITE} on $DATE" | tee ${RBUILDLOG} -- cgit v1.2.3-70-g09d2