diff options
author | kris <kris@FreeBSD.org> | 2005-10-11 03:47:33 +0000 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2005-10-11 03:47:33 +0000 |
commit | 25560583c05095de1bfe87211a021da5168942ca (patch) | |
tree | c5a8b84b617039765bfa5fda7d1b8b45c8abef16 /Tools | |
parent | 777d6130390b6fc67184e06c8dcdaf7f855655e7 (diff) | |
download | FreeBSD-ports-25560583c05095de1bfe87211a021da5168942ca.zip FreeBSD-ports-25560583c05095de1bfe87211a021da5168942ca.tar.gz |
* Use lockf -k instead of lockf. If there is ever contention from >1
process, you must use -k or lockf can give out two locks at once
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/portbuild/scripts/pdispatch | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Tools/portbuild/scripts/pdispatch b/Tools/portbuild/scripts/pdispatch index 0919ce5..9a60525 100755 --- a/Tools/portbuild/scripts/pdispatch +++ b/Tools/portbuild/scripts/pdispatch @@ -69,7 +69,7 @@ while `true`; do chroot= while [ -z "${host}" -o -z "${chroot}" ]; do chroot= - host=$(lockf ${pb}/${arch}/queue/.lock ${pb}/scripts/getmachine ${pb} ${arch} ${branch}) + host=$(lockf -k ${pb}/${arch}/queue/.lock ${pb}/scripts/getmachine ${pb} ${arch} ${branch}) # If ulist is empty, then all build machines are busy, so try again in 15 seconds. if [ -z "${host}" ]; then sleep 15 @@ -79,7 +79,7 @@ while `true`; do chroot=$(ssh -a -n ${client_user}@${host} ${sudo_cmd} ${pb}/scripts/claim-chroot ${arch} ${branch} ${pkgname}) if [ -z "${chroot}" ]; then echo "Failed to claim chroot on ${host}" - lockf ${pb}/${arch}/queue/.lock ${pb}/scripts/releasemachine ${arch} ${host} + lockf -k ${pb}/${arch}/queue/.lock ${pb}/scripts/releasemachine ${arch} ${host} fi fi done @@ -107,7 +107,7 @@ while `true`; do test -f ${pb}/${arch}/${branch}/packages/All/${pkgname}${PKGSUFFIX} && \ touch ${pb}/${arch}/${branch}/packages/All/${pkgname}${PKGSUFFIX} rm -f ${pb}/${arch}/${branch}/errors/${pkgname}.log - lockf ${pb}/${arch}/${branch}/failure.lock ${pb}/scripts/buildsuccess ${arch} ${branch} ${pkgname} + lockf -k ${pb}/${arch}/${branch}/failure.lock ${pb}/scripts/buildsuccess ${arch} ${branch} ${pkgname} log=${pb}/${arch}/${branch}/logs/$pkgname.log if grep -q "even though it is marked BROKEN" ${log}; then echo | mail -s "${pkgname} BROKEN but built on ${arch} ${branch}" kris@FreeBSD.org krion@FreeBSD.org @@ -123,12 +123,12 @@ while `true`; do if ! grep -q "even though it is marked BROKEN" ${log}; then tail -1000 ${log} | mail -s "${pkgname} failed on ${arch} ${branch}" kris@FreeBSD.org krion@FreeBSD.org fi - lockf ${pb}/${arch}/${branch}/failure.lock ${pb}/scripts/buildfailure ${arch} ${branch} ${pkgname} + lockf -k ${pb}/${arch}/${branch}/failure.lock ${pb}/scripts/buildfailure ${arch} ${branch} ${pkgname} fi ssh -a -n ${client_user}@${host} ${sudo_cmd} ${pb}/scripts/clean-chroot ${arch} ${branch} ${chroot} ${noclean} - lockf ${pb}/${arch}/queue/.lock ${pb}/scripts/releasemachine ${arch} ${host} + lockf -k ${pb}/${arch}/queue/.lock ${pb}/scripts/releasemachine ${arch} ${host} if grep -q "^build of .*ended at" ${pb}/${arch}/${branch}/logs/${pkgname}.log; then exit ${error} |