logclean: Fix empty build log directory removal with multiple jails
When multiple jails are configured, the "Removing empty build log
directories" step fails because the script incorrectly processes the
space-separated MASTERNAMES_LOCKED list.
The issue is that sed appends "/latest-per-pkg" to the end of the
entire space-separated string rather than to each jail name individually.
This results in a malformed path like:
"neptune-amd64-default odin-amd64-default saturn-amd64-default/latest-per-pkg"
Fix by converting spaces to newlines before the sed operation, ensuring
each jail name gets the suffix appended correctly.
Fixes #1157
jail -d: Tweaks; Allow rerunning and multiple -C flags.
- jail -d can now be reran to cleanup any leftover files.
- -C can be specified multiple times.
- Display each dir as it is cleaned up.
- Stop force deleting the cache dir.
- Speedup finding logs by separating out the latest-per-pkg traversal.
- Support cleaning up images.
Issue #694
do_confirm_delete: Cleanup the return statuses.
Make this return either 0 or 1 as normal functions do. This fixes
errors not being detectable.
Add 2 output vars that can communicate what was done.
This also fixes the `pkgclean done` hook to properly pass in whether
files were deleted.
tests: Simplify OVERLAYSDIR handling.
This removes the MASTERMNT symlink hacks that were shadowed and
not cleaned up properly.
The behavior was only that way because MASTERMNTREL is referenced
in _lookup_port_dir(). It can just be blank though and read from
the git checkout.
bulk fetching and -i: must disable pkgbase repo.
A pkgbase jail made by Poudriere will setup a repo named `pkgbase` which
must be disabled to ensure we use the branch passed in PACKAGE_FETCH_BRANCH.
Fixes #1312
(cherry picked from commit 422ff54ea9fcf7ce4feca216e93c8524026393ad)
bulk fetching and -i: must disable pkgbase repo.
A pkgbase jail made by Poudriere will setup a repo named `pkgbase` which
must be disabled to ensure we use the branch passed in PACKAGE_FETCH_BRANCH.
Fixes #1312