diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-10-18 18:02:52 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-10-18 18:02:52 +0200 |
commit | 87ea4ff1ddf0d8333f65b2a193f2aac058e2ca24 (patch) | |
tree | 30dcffe844b3dca9e9e989d9cc17e7057219069e | |
parent | 9d2bdd78a062c19dfd9072a1aa63f782425fbc92 (diff) | |
download | jenkins.debian.net-87ea4ff1ddf0d8333f65b2a193f2aac058e2ca24.tar.xz |
reproducible arch: implement simple locking so this script can run in parallel
-rwxr-xr-x | bin/reproducible_build_arch_pkg.sh | 5 |
1 files changed, 3 insertions, 2 deletions
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/ |