fix(patches): build-one image bincraft v4.3.0 + ship patch registry

The targeted rebuild path pinned bincraft v4.2.1, which predates the patches
argument, so build-one.R's patches= call would error. Bump to v4.3.0 (the
tagged release that adds build_binary_package(patches=)).
Also COPY the patch registry into the image so patches='local/patches'
resolves at /work/local/patches instead of silently no-opping.
This commit is contained in:
Patrick Schratz 2026-06-30 14:11:52 +02:00
commit 0aeaed4a99
Signed by: pat-s
GPG key ID: 3C6318841EF78925

View file

@ -16,6 +16,9 @@ ARG CACHEBUST
WORKDIR /work WORKDIR /work
COPY build-one.R /work/build-one.R COPY build-one.R /work/build-one.R
# Ship the patch registry so build-one.R's `patches = "local/patches"` resolves
# (build context is `local/`, CWD is /work).
COPY patches /work/local/patches
RUN --mount=type=secret,id=b2_access,required=true \ RUN --mount=type=secret,id=b2_access,required=true \
--mount=type=secret,id=b2_secret,required=true \ --mount=type=secret,id=b2_secret,required=true \
@ -37,7 +40,7 @@ RUN --mount=type=secret,id=b2_access,required=true \
echo "No working virtual display; building without xvfb" >&2; \ echo "No working virtual display; building without xvfb" >&2; \
fi; \ fi; \
run_build() { if [ "$USE_XVFB" = 1 ]; then $XVFB -a $XVFB_ARGS -- "$@"; else "$@"; fi; }; \ run_build() { if [ "$USE_XVFB" = 1 ]; then $XVFB -a $XVFB_ARGS -- "$@"; else "$@"; fi; }; \
ensure_bincraft() { "$1" -q -e 'if (!requireNamespace("bincraft", quietly = TRUE) || packageVersion("bincraft") != "4.2.1") pak::pak("git::https://codefloe.com/rpkgs/bincraft.git@v4.2.1")'; }; \ ensure_bincraft() { "$1" -q -e 'if (!requireNamespace("bincraft", quietly = TRUE) || packageVersion("bincraft") != "4.3.0") pak::pak("git::https://codefloe.com/rpkgs/bincraft.git@v4.3.0")'; }; \
PRIMARY_MINOR=$(echo "$R_VERSION" | cut -d. -f1-2); \ PRIMARY_MINOR=$(echo "$R_VERSION" | cut -d. -f1-2); \
seen=" $PRIMARY_MINOR "; \ seen=" $PRIMARY_MINOR "; \
prc=0; failed=""; \ prc=0; failed=""; \