[Qa-jenkins-scm] [jenkins.debian.net] 03/03: reproducible: redo the first build if the 2nd successful one was done after a mirror push

Holger Levsen holger at moszumanska.debian.org
Thu Jun 11 17:48:38 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 aea705d5df680b774379e9a5adecc14938260008
Author: Holger Levsen <holger at layer-acht.org>
Date:   Thu Jun 11 19:48:06 2015 +0200

    reproducible: redo the first build if the 2nd successful one was done after a mirror push
---
 bin/reproducible_build.sh | 50 +++++++++++++++++++++++++++++------------------
 1 file changed, 31 insertions(+), 19 deletions(-)

diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 8aee48a..0748b75 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -224,22 +224,6 @@ dbd_timeout() {
 	handle_ftbr "$msg"
 }
 
-check_buildinfo() {
-	local TMPFILE1=$(mktemp)
-	local TMPFILE2=$(mktemp)
-	grep-dctrl -s Build-Environment -n ${SRCPACKAGE} ./b1/$BUILDINFO > $TMPFILE1
-	grep-dctrl -s Build-Environment -n ${SRCPACKAGE} ./b2/$BUILDINFO > $TMPFILE2
-	set +e
-	diff $TMPFILE1 $TMPFILE2
-	RESULT=$?
-	set -e
-	rm $TMPFILE1 $TMPFILE2
-	if [ $RESULT -eq 1 ] ; then
-		irc_message "$BUILDINFO varies, probably due to mirror update."
-		# FIXME: rebuild again, probably just the first though
-	fi
-}
-
 call_debbindiff() {
 	local TMPLOG=(mktemp --tmpdir=$TMPDIR)
 	echo | tee -a ${RBUILDLOG}
@@ -390,6 +374,31 @@ first_build(){
 	rm $TMPCFG
 }
 
+check_buildinfo() {
+	local TMPFILE1=$(mktemp)
+	local TMPFILE2=$(mktemp)
+	grep-dctrl -s Build-Environment -n ${SRCPACKAGE} ./b1/$BUILDINFO > $TMPFILE1
+	grep-dctrl -s Build-Environment -n ${SRCPACKAGE} ./b2/$BUILDINFO > $TMPFILE2
+	set +e
+	diff $TMPFILE1 $TMPFILE2
+	RESULT=$?
+	set -e
+	rm $TMPFILE1 $TMPFILE2
+	if [ $RESULT -eq 1 ] ; then
+		irc_message "$BUILDINFO varies, probably due to mirror update. Doing the first build again, please check ${BUILD_URL}console for now..."
+		first_build
+		grep-dctrl -s Build-Environment -n ${SRCPACKAGE} ./b1/$BUILDINFO > $TMPFILE1
+		set +e
+		diff $TMPFILE1 $TMPFILE2
+		RESULT=$?
+		set -e
+		if [ $RESULT -eq 1 ] ; then
+			irc_message "$BUILDINFO varies again, what??? Please investigate"
+		fi
+	fi
+	rm $TMPFILE1 $TMPFILE2
+}
+
 build_rebuild() {
 	FTBFS=1
 	mkdir b1 b2
@@ -428,9 +437,6 @@ build_rebuild() {
 		fi
 		rm $TMPCFG
 	fi
-	cleanup_userContent
-	update_rbuildlog
-	if [ $FTBFS -eq 1 ] ; then handle_ftbfs ; fi
 }
 
 #
@@ -467,6 +473,12 @@ check_for_race_conditions
 build_rebuild  # defines FTBFS redefines RBUILDLOG
 if [ $FTBFS -eq 0 ] ; then
 	check_buildinfo
+fi
+cleanup_userContent
+update_rbuildlog
+if [ $FTBFS -eq 1 ] ; then
+	handle_ftbfs
+elif [ $FTBFS -eq 0 ] ; then
 	call_debbindiff  # defines DBDVERSION, update_db_and_html defines STATUS
 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