Prepare a local repo of patched binaries for the current build
prepare_patched_repo.RdFor each registry entry matching the current platform, ensures a patched
binary is present in repo_dir (from cache_dir if available, else built
and then cached) and writes a PACKAGES index over them.
Usage
prepare_patched_repo(
patches_dir,
platform,
arch,
r_minor,
cache_dir = file.path("/mnt", "cache", "patched-binaries"),
repo_dir = NULL,
target = NULL
)Arguments
- patches_dir
Directory with
registry.json, orNULL.- platform
Build platform, e.g.
"ubuntu-2604".- arch
Build arch, e.g.
"amd64".- r_minor
R
"major.minor"string, e.g."4.5".- cache_dir
Persistent cache for patched binaries.
- repo_dir
Directory to assemble the local repo in. Defaults to a content-addressed path under
cache_dirso identical patch sets reuse a stable repo URL; pass an explicit path to override.- target
Name of the package being built, or
NULL. Its own entries are skipped: they patch its source viaselect_target_patch_entry(), and a package is never in its own dependency tree.
Details
The repo is assembled at a content-addressed path derived from the resolved
patch set. Because every build_binary_package() call in a run passes the
same patches/platform/arch/R, they all resolve to the same repo, so it is
assembled once and later calls take the fast path over the validated
binaries. install_patched_into_library() then installs its tarballs into
the build library before uvr sync.