diff options
author | kris <kris@FreeBSD.org> | 2007-02-18 16:57:20 +0800 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2007-02-18 16:57:20 +0800 |
commit | abbf2dfae80e9872893076596aed81a44ea19407 (patch) | |
tree | cbedd3d8c51aedc653a473017aed50175a61b3d8 /Tools | |
parent | 1cb9da0dfc5ca2aaefbcecdb0e174a61f67685d5 (diff) | |
download | freebsd-ports-gnome-abbf2dfae80e9872893076596aed81a44ea19407.tar.gz freebsd-ports-gnome-abbf2dfae80e9872893076596aed81a44ea19407.tar.zst freebsd-ports-gnome-abbf2dfae80e9872893076596aed81a44ea19407.zip |
Also attempt to clean /root/.ccache in case it is in use. When cleaning
on a machine that has use_md_swap=1, allow for the possibility of reusing
a md between builds if md_persistent=1. This requires a patch from pjd
to support BIO_DELETE in md devices, but it is a big optimization when
it can be used.
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/portbuild/scripts/clean-chroot | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Tools/portbuild/scripts/clean-chroot b/Tools/portbuild/scripts/clean-chroot index 545cd7e394d1..182e0cccab52 100755 --- a/Tools/portbuild/scripts/clean-chroot +++ b/Tools/portbuild/scripts/clean-chroot @@ -67,18 +67,16 @@ if [ ${arch} = "i386" -o ${arch} = "amd64" ]; then cleanup_mount ${chroot} /compat/linux/proc fi -for i in /a/ports /usr/src /dev; do +for i in /a/ports /usr/src /dev /root/.ccache; do cleanup_mount ${chroot} ${i} done #kill_procs ${chroot} -if [ "${use_md_swap}" = "1" ]; then - if [ "${clean}" -gt "0" ]; then - cleanup_mount ${chroot} "" - mdconfig -d -u $(basename ${chroot}) - rm -rf ${chroot} - fi +if [ "${use_md_swap}" = "1" -a \( "${md_persistent}" != "1" -a "${clean}" -gt "0" \) -o "${clean}" = "2" ]; then + cleanup_mount ${chroot} "" + mdconfig -d -u $(basename ${chroot}) + rm -rf ${chroot} else if [ "${clean}" = 1 ]; then rm -rf ${chroot}/tmp/* |