[94461] contrib/buildbot/deploy_archives.sh
jmr at macports.org
jmr at macports.org
Tue Jun 19 15:56:21 PDT 2012
Revision: 94461
https://trac.macports.org/changeset/94461
Author: jmr at macports.org
Date: 2012-06-19 15:56:20 -0700 (Tue, 19 Jun 2012)
Log Message:
-----------
use a lockfile to avoid a race when deploying archives
Modified Paths:
--------------
contrib/buildbot/deploy_archives.sh
Modified: contrib/buildbot/deploy_archives.sh
===================================================================
--- contrib/buildbot/deploy_archives.sh 2012-06-19 22:38:33 UTC (rev 94460)
+++ contrib/buildbot/deploy_archives.sh 2012-06-19 22:56:20 UTC (rev 94461)
@@ -20,8 +20,19 @@
PRIVKEY=""
fi
+# buildbot apparently doesn't run jobs on the master in different dirs or
+# prevent them from running simultaneously
+if [[ -z "$LOCKFILE" ]]; then
+ LOCKFILE="./deploy.lock"
+fi
+
+while ! shlock -f $LOCKFILE -p $$; do
+ sleep 1
+done
+
if [[ ! -d $ULPATH ]]; then
echo $ULPATH does not exist!
+ rm $LOCKFILE
exit 1
fi
@@ -36,6 +47,7 @@
chmod a+r ${ULPATH}/${portname}/${aname}.rmd160
else
rm -rf $ULPATH
+ rm $LOCKFILE
exit 1
fi
fi
@@ -52,4 +64,5 @@
fi
# clean up after ourselves
+rm $LOCKFILE
rm -rf $ULPATH
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120619/bbe6ebd4/attachment.html>
More information about the macports-changes
mailing list