feat: save package+version pairs instead of just package names

packages-to-build.R now saves the full (Package, Version) data.table
so the build step can pass specific tags to build_binary_package(),
eliminating redundant per-package tag discovery and S3 checks.
Also reduces archive versions from 9 to 4 (+ 1 release = 5 total).
This commit is contained in:
Patrick Schratz 2026-04-17 18:20:00 +02:00
commit 21ec8a67dd
Signed by: pat-s
GPG key ID: 3C6318841EF78925

View file

@ -48,11 +48,12 @@ archive_versions <- rbindlist(
fill = TRUE
)
# Select the 9 most recent by mtime for each package
# Select the 4 most recent archive versions by mtime for each package
# Combined with the 1 release version = 5 versions per package
archive_versions <- archive_versions[
order(Package, -as.numeric(mtime))
][,
head(.SD, 9),
head(.SD, 4),
by = Package
][,
.(Package, Version)
@ -128,5 +129,8 @@ setkey(errored_pkgs, Package, Version)
### Final subsetting
pkgs_no_error <- pkgs_to_build[!errored_pkgs]
# only return package names
pkgs <- unique(as.character(pkgs_no_error[!s3_dt, Package]))
# Return the full (Package, Version) pairs that need building
pkgs <- pkgs_no_error[!s3_dt]
# Deduplicate
pkgs <- unique(pkgs)
setorder(pkgs, Package, Version)