[Qa-jenkins-scm] [jenkins.debian.net] 05/05: reproducible: build: refactor: more trimming of the main function + fix variable declaration order
Holger Levsen
holger at moszumanska.debian.org
Sat Apr 18 15:25: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 b4d6ef23a889ec37b539bbc06311efe8a680bd96
Author: Mattia Rizzolo <mattia at mapreri.org>
Date: Mon Apr 6 00:31:58 2015 +0200
reproducible: build: refactor: more trimming of the main function + fix variable declaration order
---
bin/reproducible_build.sh | 23 +++++++++++------------
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 0947e28..5ba241f 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -192,6 +192,8 @@ init() {
echo "============================================================================="
# mark build attempt
sqlite3 -init $INIT ${PACKAGES_DB} "REPLACE INTO schedule (package_id, date_scheduled, date_build_started) VALUES ('$SRCPKGID', '$SCHEDULED_DATE', '$DATE');"
+ echo "Starting to build ${SRCPACKAGE}/${SUITE} on $DATE" | tee ${RBUILDLOG}
+ echo "The jenkins build log is/was available at $BUILD_URL/console" | tee -a ${RBUILDLOG}
}
get_source_package() {
@@ -216,26 +218,23 @@ TMPCFG=$(mktemp -t pbuilderrc_XXXX)
trap cleanup_all INT TERM EXIT
cd $TMPDIR
-# 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
+
+RBUILDLOG=/var/lib/jenkins/userContent/rbuild/${SUITE}/${ARCH}/${SRCPACKAGE}_None.rbuild.log
+DBDREPORT=$(echo ${SRCPACKAGE}_${EVERSION}.debbindiff.html)
+BUILDINFO=${SRCPACKAGE}_${EVERSION}_${ARCH}.buildinfo
+
init
+get_source_package
+
+VERSION=$(grep "^Version: " ${SRCPACKAGE}_*.dsc| head -1 | egrep -v '(GnuPG v|GnuPG/MacGPG2)' | cut -d " " -f2-)
+EVERSION=$(echo $VERSION | cut -d ":" -f2) # EPOCH_FREE_VERSION was too long
- echo "Starting to build ${SRCPACKAGE}/${SUITE} on $DATE" | tee ${RBUILDLOG}
- echo "The jenkins build log is/was available at $BUILD_URL/console" | tee -a ${RBUILDLOG}
- set +e
- get_source_package
- VERSION=$(grep "^Version: " ${SRCPACKAGE}_*.dsc| head -1 | egrep -v '(GnuPG v|GnuPG/MacGPG2)' | cut -d " " -f2-)
- # EPOCH_FREE_VERSION was too long
- EVERSION=$(echo $VERSION | cut -d ":" -f2)
# preserve RBUILDLOG as TMPLOG, then cleanup userContent from previous builds,
# and then access RBUILDLOG with it's correct name (=eversion)
TMPLOG=$(mktemp)
--
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