From 87ea4ff1ddf0d8333f65b2a193f2aac058e2ca24 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sun, 18 Oct 2015 18:02:52 +0200 Subject: reproducible arch: implement simple locking so this script can run in parallel --- bin/reproducible_build_arch_pkg.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/reproducible_build_arch_pkg.sh b/bin/reproducible_build_arch_pkg.sh index ed458801..fd01cd43 100755 --- a/bin/reproducible_build_arch_pkg.sh +++ b/bin/reproducible_build_arch_pkg.sh @@ -185,6 +185,9 @@ for PKG in $PACKAGES ; do if [ ! -d $BASE/archlinux/$PKG ] || [ ! -z $(find $BASE/archlinux/ -name $PKG -mtime +6) ] ; then SRCPACKAGE=$PKG echo "Building $PKG now..." + # very simple locking… + mkdir -p $BASE/archlinux/$PKG + touch $BASE/archlinux/$PKG break fi done @@ -214,13 +217,11 @@ if [ ! -z "$(ls $TMPDIR/b1/$SRCPACKAGE/*.pkg.tar.xz 2>/dev/null|| true)" ] ; the call_diffoscope $SRCPACKAGE $ARTIFACT # publish page if [ -f $TMPDIR/$SRCPACKAGE/$ARTIFACT.html ] ; then - mkdir -p $BASE/archlinux/$SRCPACKAGE/ cp $TMPDIR/$SRCPACKAGE/$ARTIFACT.html $BASE/archlinux/$SRCPACKAGE/ fi done fi # publish logs -mkdir -p $BASE/archlinux/$SRCPACKAGE/ cd $TMPDIR/b1/$SRCPACKAGE cp build1.log $BASE/archlinux/$SRCPACKAGE/ [ ! -f $TMPDIR/b2/$SRCPACKAGE/build2.log ] || cp $TMPDIR/b2/$SRCPACKAGE/build2.log $BASE/archlinux/$SRCPACKAGE/ -- cgit v1.2.3-70-g09d2