[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible Arch Linux: write pkg.version after package build

Holger Levsen holger at layer-acht.org
Sat Dec 2 23:33:26 UTC 2017


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 b1bfcc669a9fb7451364b374e458fd509e2e93f0
Author: Holger Levsen <holger at layer-acht.org>
Date:   Sat Dec 2 23:33:16 2017 +0000

    reproducible Arch Linux: write pkg.version after package build
    
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 bin/reproducible_build_archlinux_pkg.sh | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/bin/reproducible_build_archlinux_pkg.sh b/bin/reproducible_build_archlinux_pkg.sh
index e8d5e0d..f381584 100755
--- a/bin/reproducible_build_archlinux_pkg.sh
+++ b/bin/reproducible_build_archlinux_pkg.sh
@@ -430,8 +430,17 @@ cd $TMPDIR/b1/$SRCPACKAGE
 cp build1.log $BASE/archlinux/$REPOSITORY/$SRCPACKAGE/
 [ ! -f $TMPDIR/b2/$SRCPACKAGE/build2.log ] || cp $TMPDIR/b2/$SRCPACKAGE/build2.log $BASE/archlinux/$REPOSITORY/$SRCPACKAGE/
 echo $DURATION > $BASE/archlinux/$REPOSITORY/$SRCPACKAGE/pkg.build_duration || true
-cp build1.version $BASE/archlinux/$REPOSITORY/$SRCPACKAGE/ || true
-[ ! -f $TMPDIR/b2/$SRCPACKAGE/build2.version ] || cp $TMPDIR/b2/$SRCPACKAGE/build2.version $BASE/archlinux/$REPOSITORY/$SRCPACKAGE/
+if [ -f $TMPDIR/b2/$SRCPACKAGE/build2.version ] ; then
+	cp $TMPDIR/b2/$SRCPACKAGE/build2.version $BASE/archlinux/$REPOSITORY/$SRCPACKAGE/
+	cp $TMPDIR/b2/$SRCPACKAGE/build2.version $BASE/archlinux/$REPOSITORY/$SRCPACKAGE/pkg.version
+elif [ -f build1.version ] ; then
+	cp build1.version $BASE/archlinux/$REPOSITORY/$SRCPACKAGE/
+	cp $TMPDIR/b1/$SRCPACKAGE/build1.version $BASE/archlinux/$REPOSITORY/$SRCPACKAGE/pkg.version
+else
+	# this should not happen but does, so deal with it
+	echo "$VERSION" > $BASE/archlinux/$REPOSITORY/$SRCPACKAGE/pkg.version
+fi
+
 echo "$(date -u) - $REPRODUCIBLE_URL/archlinux/$REPOSITORY/$SRCPACKAGE/ updated."
 # force update of HTML snipplet in reproducible_html_archlinux.sh
 [ ! -f $BASE/archlinux/$REPOSITORY/$SRCPACKAGE/pkg.state ] || rm $BASE/archlinux/$REPOSITORY/$SRCPACKAGE/pkg.state

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