summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_build_arch_pkg.sh
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-10-18 18:02:52 +0200
committerHolger Levsen <holger@layer-acht.org>2015-10-18 18:02:52 +0200
commit87ea4ff1ddf0d8333f65b2a193f2aac058e2ca24 (patch)
tree30dcffe844b3dca9e9e989d9cc17e7057219069e /bin/reproducible_build_arch_pkg.sh
parent9d2bdd78a062c19dfd9072a1aa63f782425fbc92 (diff)
downloadjenkins.debian.net-87ea4ff1ddf0d8333f65b2a193f2aac058e2ca24.tar.xz
reproducible arch: implement simple locking so this script can run in parallel
Diffstat (limited to 'bin/reproducible_build_arch_pkg.sh')
-rwxr-xr-xbin/reproducible_build_arch_pkg.sh5
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/