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

Holger Levsen holger at moszumanska.debian.org
Fri Oct 16 20:49:30 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 b8e72ec2b2876dca5ae88df75c5ff15ded5fe83c
Author: Holger Levsen <holger at layer-acht.org>
Date:   Fri Oct 16 22:48:41 2015 +0200

    reproducible arch: refactor
---
 bin/reproducible_build_arch_pkg.sh | 45 +++++++++++++++++++-------------------
 1 file changed, 23 insertions(+), 22 deletions(-)

diff --git a/bin/reproducible_build_arch_pkg.sh b/bin/reproducible_build_arch_pkg.sh
index e15b830..2a96ede 100755
--- a/bin/reproducible_build_arch_pkg.sh
+++ b/bin/reproducible_build_arch_pkg.sh
@@ -114,12 +114,6 @@ remote_build() {
 }
 
 build_rebuild() {
-	mkdir b1 b2
-	remote_build 1
-	# only do the 2nd build if the 1st produced some results
-	if [ ! -z "$(ls $TMPDIR/b1/$SRCPACKAGE/*.pkg.tar.xz)" ] ; then
-		remote_build 2
-	fi
 }
 
 #
@@ -182,25 +176,32 @@ if [ -z $SRCPACKAGE ] ; then
 	exit 0
 fi
 # build package twice
-build_rebuild
-# run diffoscope on the results
-TIMEOUT="30m"
-DIFFOSCOPE="$(schroot --directory /tmp -c source:jenkins-reproducible-${DBDSUITE}-diffoscope diffoscope -- --version 2>&1)"
-echo "$(date -u) - Running $DIFFOSCOPE now..."
+mkdir b1 b2
+remote_build 1
+# publish log
 mkdir -p $BASE/archlinux/$SRCPACKAGE/
 cd $TMPDIR/b1/$SRCPACKAGE
 cp build1.log $BASE/archlinux/$SRCPACKAGE/
-cd $TMPDIR/b1/$SRCPACKAGE
-[ ! -f build2.log ] || cp build2.log $BASE/archlinux/$SRCPACKAGE/
-cd $TMPDIR/b1/$SRCPACKAGE
-for ARTIFACT in *.pkg.tar.xz ; do
-	call_diffoscope $SRCPACKAGE $ARTIFACT
-	# publish page
-	if [ -f $TMPDIR/$SRCPACKAGE/$ARTIFACT.html ] ; then
-		cp $TMPDIR/$SRCPACKAGE/$ARTIFACT.html $BASE/archlinux/$SRCPACKAGE/
-		echo "$(date -u) - $REPRODUCIBLE_URL/archlinux/$SRCPACKAGE/$ARTIFACT.html updated."
-	fi
-done
+# only do the 2nd build if the 1st produced some results
+if [ ! -z "$(ls $TMPDIR/b1/$SRCPACKAGE/*.pkg.tar.xz)" ] ; then
+	remote_build 2
+	cd $TMPDIR/b2/$SRCPACKAGE
+	cp build2.log $BASE/archlinux/$SRCPACKAGE/
+	# run diffoscope on the results
+	TIMEOUT="30m"
+	DIFFOSCOPE="$(schroot --directory /tmp -c source:jenkins-reproducible-${DBDSUITE}-diffoscope diffoscope -- --version 2>&1)"
+	echo "$(date -u) - Running $DIFFOSCOPE now..."
+	cd $TMPDIR/b1/$SRCPACKAGE
+	for ARTIFACT in *.pkg.tar.xz ; do
+		[ ! -f $ARTIFACT ] || continue
+		call_diffoscope $SRCPACKAGE $ARTIFACT
+		# publish page
+		if [ -f $TMPDIR/$SRCPACKAGE/$ARTIFACT.html ] ; then
+			cp $TMPDIR/$SRCPACKAGE/$ARTIFACT.html $BASE/archlinux/$SRCPACKAGE/
+			echo "$(date -u) - $REPRODUCIBLE_URL/archlinux/$SRCPACKAGE/$ARTIFACT.html updated."
+		fi
+	done
+fi
 
 cd
 cleanup_all

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