diff options
author | Holger Levsen <holger@layer-acht.org> | 2017-11-21 20:16:12 +0000 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2017-11-21 20:16:12 +0000 |
commit | 026431ca89f8b0bbfbfe579e3815b1bcf930efd0 (patch) | |
tree | 0f734b3800aad51bf999d142d44285d561801f29 /bin | |
parent | a1fa0647e7058d4fa2792ca065f7d9b693496c52 (diff) | |
download | jenkins.debian.net-026431ca89f8b0bbfbfe579e3815b1bcf930efd0.tar.xz |
reproducible Arch Linux: only call diffoscope if artifacts are different
Signed-off-by: Holger Levsen <holger@layer-acht.org>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_build_archlinux_pkg.sh | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/bin/reproducible_build_archlinux_pkg.sh b/bin/reproducible_build_archlinux_pkg.sh index b5936907..5a35c757 100755 --- a/bin/reproducible_build_archlinux_pkg.sh +++ b/bin/reproducible_build_archlinux_pkg.sh @@ -326,18 +326,21 @@ remote_build 1 # only do the 2nd build if the 1st produced results if [ ! -z "$(ls $TMPDIR/b1/$SRCPACKAGE/*.pkg.tar.xz 2>/dev/null|| true)" ] ; then remote_build 2 - # 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 + echo "$(date -u) - comparing results now." if diff -q $TMPDIR/b1/$SRCPACKAGE/$ARTIFACT $TMPDIR/b2/$SRCPACKAGE/$ARTIFACT ; then - echo "YAY - $SRCPACKAGE/$ARTIFACT build reproducible in our test framework!" + echo "$(date -u) - YAY - $SRCPACKAGE/$ARTIFACT build reproducible in our test framework!" + mkdir -p $BASE/archlinux/$REPOSITORY/$SRCPACKAGE echo "$SRCPACKAGE/$ARTIFACT build reproducible in our test framework:" > $BASE/archlinux/$REPOSITORY/$SRCPACKAGE/$ARTIFACT.html (cd $TMPDIR/b1/ ; sha256sum $SRCPACKAGE/$ARTIFACT >> $BASE/archlinux/$REPOSITORY/$SRCPACKAGE/$ARTIFACT.html ) + else + # 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..." + call_diffoscope $SRCPACKAGE $ARTIFACT fi # publish page if [ -f $TMPDIR/$SRCPACKAGE/$ARTIFACT.html ] ; then |