pkgchroot: remove the mount points after the unmount

checkflist stopped the MacBook release with 105 extra files in DESTDIR: ./mnt/dev, ./mnt/pkgsrc,
./mnt/work ... (the sandbox's mount points), plus debris of earlier runs (a nested usr/src tree,
var/tmp/cwdtest*, dev/null, etc/usermgmt.conf), which were removed from build/obj by hand.
The mount points are rmdir'ed now, never rm -rf'ed: a mounted directory is not touched.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
lotherkandClaude Sonnet 5.5 committed 2026-11-24 09:14:56 +00:00
1 parent 9692da9a43
commit f5cb3e0048
1 file changed
+7
+7
View File
@@ -34,6 +34,13 @@ umount_all()
umount "$t" || break
done
done
# The mount points are not part of any set: checkflist listed ./mnt/dev,
# ./mnt/pkgsrc ... as extra files (measured 2026-11-24, MacBook). rmdir, never
# rm -rf: on a directory that is still mounted it fails and removes nothing.
for t in "$MNT"/*; do
[ -d "$t" ] && rmdir "$t" 2>/dev/null
done
return 0
}
sandbox_mount()