summaryrefslogtreecommitdiffstats
path: root/mockit
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2023-09-14 09:36:06 +0200
committerRemi Collet <remi@php.net>2023-09-14 09:36:06 +0200
commit798ded27e035fff0d5c5617319c6f7c60913814d (patch)
tree248b5aac9908979aceeed3938150a374aef4149f /mockit
parentac879a65ab3c768af2f269fd426041affdc78f4d (diff)
use flock to avoid failure because of conflicts
Diffstat (limited to 'mockit')
-rwxr-xr-xmockit6
1 files changed, 4 insertions, 2 deletions
diff --git a/mockit b/mockit
index bd740a2..5de58a2 100755
--- a/mockit
+++ b/mockit
@@ -72,18 +72,20 @@ case $DIST in
;;
esac
+# TODO waiting for --uniqueext (instead of flock) when mock 5 dnf cache lock will be fixed
+
[ $BUILD_BASE -ge 1 ] && for i in $LST
do
if [ 0$i -ge $MIN -a 0$i -le $MAX ]; then
echo -n "$(date +%X) $i "
- mock -q --configdir=$mocketc -r ${DIST}${i} rebuild $SRPM "$@" && echo " Ok." || echo " Error !"
+ flock /tmp/build_${DIST}${i}.lock mock -q --configdir=$mocketc -r ${DIST}${i} rebuild $SRPM "$@" && echo " Ok." || echo " Error !"
fi
done
[ $BUILD_SCLS -ge 1 ] && for i in $SCL
do
if [ 0$i -ge $MIN -a 0$i -le $MAX ]; then
echo -n "$(date +%X) scl$i "
- mock -q --configdir=$mocketc -r ${DIST}scl${i} rebuild $SRPM "$@" && echo " Ok." || echo " Error !"
+ flock /tmp/build_${DIST}scl${i}.lock mock -q --configdir=$mocketc -r ${DIST}scl${i} rebuild $SRPM "$@" && echo " Ok." || echo " Error !"
fi
done
date +%X