From 2692a9985b5f15fa33757b4ef923c836a46227c0 Mon Sep 17 00:00:00 2001 From: kris Date: Fri, 3 Feb 2006 20:07:13 +0000 Subject: Also look for chroots that are marked 'dirty' (previous build left chroot in unclean state) and run clean-chroot on them to remove them. --- Tools/portbuild/scripts/claim-chroot | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- cgit