summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-10-16 22:48:41 +0200
committerHolger Levsen <holger@layer-acht.org>2015-10-16 22:48:41 +0200
commitb8e72ec2b2876dca5ae88df75c5ff15ded5fe83c (patch)
tree2f9c150b54cd01d9c67b4411a77aa0cd43069ab4
parent818a99e1c042735e5bb885ce71e8dd14c38a565e (diff)
downloadjenkins.debian.net-b8e72ec2b2876dca5ae88df75c5ff15ded5fe83c.tar.xz
reproducible arch: refactor
-rwxr-xr-xbin/reproducible_build_arch_pkg.sh45
1 files changed, 23 insertions, 22 deletions
diff --git a/bin/reproducible_build_arch_pkg.sh b/bin/reproducible_build_arch_pkg.sh
index e15b8307..2a96edeb 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