diff options
author | Kris Kennaway <kris@FreeBSD.org> | 2006-02-03 20:07:13 +0000 |
---|---|---|
committer | Kris Kennaway <kris@FreeBSD.org> | 2006-02-03 20:07:13 +0000 |
commit | a65bd63641b800cd1ce87d9f83dc27263576c533 (patch) | |
tree | cf93453e954d26fe4e69e69574d97577408615e3 /Tools | |
parent | a9f9b51a89b07e4da744ff18113c10a01e396f27 (diff) | |
download | ports-a65bd63641b800cd1ce87d9f83dc27263576c533.tar.gz ports-a65bd63641b800cd1ce87d9f83dc27263576c533.zip |
Notes
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/portbuild/scripts/claim-chroot | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Tools/portbuild/scripts/claim-chroot b/Tools/portbuild/scripts/claim-chroot index 3700244d41ef..52bf12bbb4d7 100755 --- a/Tools/portbuild/scripts/claim-chroot +++ b/Tools/portbuild/scripts/claim-chroot @@ -27,10 +27,14 @@ chrootdir=${buildroot}/${branch}/chroot found=0 # Look for pre-existing chroot directories that are populated and unused for dir in ${chrootdir}/*; do - if [ -f ${dir}/.ready -a -d ${dir}/tmp ]; then + if [ -f ${dir}/.ready -o -f ${dir}/.dirty ]; then # Atomically claim the directory mkdir ${dir}/used 2>/dev/null || continue touch ${dir}/used/${pkgname} + if [ -f ${dir}/.dirty ]; then + ${pb}/scripts/clean-chroot ${arch} ${branch} ${dir} 2 & + continue + fi found=1 chroot=${dir} break |