aboutsummaryrefslogtreecommitdiffstats
path: root/Tools/portbuild
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2006-02-04 04:07:13 +0800
committerkris <kris@FreeBSD.org>2006-02-04 04:07:13 +0800
commit2692a9985b5f15fa33757b4ef923c836a46227c0 (patch)
treee10345fd56463d08939dd07975ce1b6f0c3bf7e6 /Tools/portbuild
parentfff88e996c0805e1fbdca52ca6db22aa6583b9e4 (diff)
downloadfreebsd-ports-gnome-2692a9985b5f15fa33757b4ef923c836a46227c0.tar.gz
freebsd-ports-gnome-2692a9985b5f15fa33757b4ef923c836a46227c0.tar.zst
freebsd-ports-gnome-2692a9985b5f15fa33757b4ef923c836a46227c0.zip
Also look for chroots that are marked 'dirty' (previous build left chroot
in unclean state) and run clean-chroot on them to remove them.
Diffstat (limited to 'Tools/portbuild')
-rwxr-xr-xTools/portbuild/scripts/claim-chroot6
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