[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible: refactor

Holger Levsen holger at moszumanska.debian.org
Sat May 23 12:12:58 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 d464849cf02b70d102a989866722512e0c7202b5
Author: Holger Levsen <holger at layer-acht.org>
Date:   Sat May 23 14:12:53 2015 +0200

    reproducible: refactor
---
 bin/reproducible_build.sh | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 0ce7ce2..ec16966 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -131,6 +131,12 @@ update_db_and_html() {
 	echo
 }
 
+update_rbuildlog() {
+	chmod 644 $RBUILDLOG
+	mv $RBUILDLOG $BASE/rbuild/${SUITE}/${ARCH}/${SRCPACKAGE}_${EVERSION}.rbuild.log
+	RBUILDLOG=$BASE/rbuild/${SUITE}/${ARCH}/${SRCPACKAGE}_${EVERSION}.rbuild.log
+}
+
 print_out_duration() {
 	local HOUR=$(echo "$DURATION/3600"|bc)
 	local MIN=$(echo "($DURATION-$HOUR*3600)/60"|bc)
@@ -145,9 +151,7 @@ handle_404() {
 	irc_message "$BUILD_URL encountered a 404 problem."
 	DURATION=''
 	EVERSION="None"
-	chmod 644 $RBUILDLOG
-	mv $RBUILDLOG $BASE/rbuild/${SUITE}/${ARCH}/${SRCPACKAGE}_${EVERSION}.rbuild.log
-	RBUILDLOG=$BASE/rbuild/${SUITE}/${ARCH}/${SRCPACKAGE}_${EVERSION}.rbuild.log
+	update_rbuildlog
 	update_db_and_html "404"
 	if [ $SAVE_ARTIFACTS -eq 1 ] ; then SAVE_ARTIFACTS=0 ; fi
 	if [ ! -z "$NOTIFY" ] ; then NOTIFY="failure" ; fi
@@ -157,10 +161,8 @@ handle_404() {
 handle_not_for_us() {
 	# a list of valid architecture for this package should be passed to this function
 	echo "Package ${SRCPACKAGE} (${VERSION}) shall only be build on \"$(echo "$@" | xargs echo )\" and thus was skipped." | tee -a ${RBUILDLOG}
-	chmod 644 $RBUILDLOG
-	mv $RBUILDLOG $BASE/rbuild/${SUITE}/${ARCH}/${SRCPACKAGE}_${EVERSION}.rbuild.log
-	RBUILDLOG=$BASE/rbuild/${SUITE}/${ARCH}/${SRCPACKAGE}_${EVERSION}.rbuild.log
 	DURATION=''
+	update_rbuildlog
 	update_db_and_html "not for us"
 	if [ $SAVE_ARTIFACTS -eq 1 ] ; then SAVE_ARTIFACTS=0 ; fi
 	if [ ! -z "$NOTIFY" ] ; then NOTIFY="failure" ; fi
@@ -434,9 +436,7 @@ build_rebuild() {
 		fi
 	fi
 	cleanup_userContent
-	chmod 644 $RBUILDLOG
-	mv $RBUILDLOG $BASE/rbuild/${SUITE}/${ARCH}/${SRCPACKAGE}_${EVERSION}.rbuild.log
-	RBUILDLOG=$BASE/rbuild/${SUITE}/${ARCH}/${SRCPACKAGE}_${EVERSION}.rbuild.log
+	update_rbuildlog
 	rm $TMPCFG
 	if [ $FTBFS -eq 1 ] ; then handle_ftbfs ; fi
 }

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