Rework the utilities for site directory management in rb-site.

Review Request #13019 — Created May 5, 2023 and submitted — Latest diff uploaded

Information

Review Board
release-5.0.x

Reviewers

When build/rebuilding a site directory, we use a handful of utility
methods to create directories, delete them, and symlink them. These grew
organically, and the names aren't a particularly good fit for some
current and upcoming uses. Some of the code also uses older coding
standards.

This changes up the methods, giving them more general names and adding a
bit more flexibility in their use.

The bulk of link_pkg_dir() is now in mirror_files(), which can be
told to explicitly symlink or explicitly copy a tree, instead of just
using the caller's option. link_pkg_dir() simply wraps it with some
values.

unlink_media_dir() is now remove_files().

The code calling these have been updated to use single quotes and to
avoid repeated attribute lookup.

Support for $sitedir/bin has also been added. This will be created if
it doesn't already exist.

Tested installing and upgrading site directories, and verifying the
resulting directory structure.

Commits

Files