build-cran-binaries/local
Repository files (latest commit first)
Filename Latest commit message Latest commit date
pat-s 6372f0f928 fix(ci): refresh the apt index before uvr installs system dependencies (#161)
Unblocks the ubuntu 26.04 builds without waiting for an image rebuild.

## What broke

```
i Installing R package dependencies
! Error in installing dependencies for package huge with tag 2.0.1:
  uvr sync --install-system-deps --library /mnt/cache/R-pkgs-4.4 failed (exit 1)

 ! WARN  Missing system dependencies for 1 package(s)
  igraph needs: libglpk-dev
> Running: apt-get install -y libglpk-dev
E: Unable to locate package libglpk-dev
```

Neither the package name nor the sysreq mapping is wrong. `libglpk-dev` is `5.0-2build1` in `universe`, which `ubuntu:resolute` enables by default. What is missing is the apt index: uvr v0.4.5 runs `apt-get install` with no `apt-get update` before it, and every ubuntu build image ends its apt layers with `rm -rf /var/lib/apt/lists/*`, so the shipped image has no index at all.

Not specific to 26.04 — jammy and noble fail identically for any sysreq the image's preinstall line doesn't already cover. 26.04 surfaced it first, through `igraph` and everything depending on it (`huge` was the first to fail).

## Fix

`apt-get update` before the sync in `local/uvr-install.sh`.

That one site covers every pipeline: `build-all-versions`, `build-all-versions-install-deps`, `weekly-rebuild-missing`, `weekly-audit-missing`, `trial-build-registry`, `auto-apply-patches` and `weekly-patch-proposals` all reach it, either directly or through `install-bincraft.R`. The index it populates persists for the rest of the step, so the bincraft-driven `uvr sync` calls that follow are covered too.

Guarded on `apt-get` and non-fatal: `apk add` fetches its index implicitly and dnf refreshes expired metadata on its own, so alpine and redhat are unaffected and skip it.

## Why here as well as in the image

The real fix is upstream `e491b2e`, which refreshes the index before the auto-install. It landed one day after v0.4.5 was tagged, so no release carries it ([nbafrank/uvr#250](https://github.com/nbafrank/uvr/issues/250)); [build-env-images#23](https://codefloe.com/rpkgs/build-env-images/pulls/23) pins the ubuntu image to a commit that has it.

That only reaches CI after an image rebuild is triggered. This change takes effect on the next pipeline run. It also stays useful afterwards: a baked index goes stale within weeks, and a stale index turns the same install into a 404 on the `.deb`.

## Verified

In `ubuntu:resolute`, with the image state reproduced exactly (R installed, then `rm -rf /var/lib/apt/lists/*` to empty the index again):

| Check | Result |
|---|---|
| `apt-get install -y libglpk-dev`, empty index | `E: Unable to locate package libglpk-dev` — the reported failure, reproduced |
| Same container after `apt-get update` | `Candidate: 5.0-2build1`, `Components: main universe restricted multiverse` |
| `igraph` + `UVR_INSTALL_SYSREQS=1 uvr sync`, empty index, uvr with the refresh | `Setting up libglpk-dev:amd64 (5.0-2build1)`, `System dependencies installed.`, `Installed 11 package(s)` |
| `sh -n` and `shellcheck local/uvr-install.sh` | pass |

## Reverting

Delete the guarded block. It is marked TEMPORARY with the upstream reference, and can go once the images ship a uvr above v0.4.5.

Reviewed-on: #161
2026-08-10 06:30:25 +00:00
..
patches fix(patches): force RcppParallel to use its bundled oneTBB (#146) 2026-07-31 09:48:41 +00:00
tests refactor: migrate package installation from pak to uvr (#147) 2026-07-31 12:19:26 +00:00
archive-missed-pkgs.R feat: R-minor-sensitive binary builds (full + iterative) (#84) 2026-06-14 08:04:40 +00:00
build-all.R refactor: migrate package installation from pak to uvr (#147) 2026-07-31 12:19:26 +00:00
build-one.R feat: patch registry + wiring for per-package patching (#103) 2026-06-30 08:50:19 +00:00
check-cdn-cache.sh add alpine321 to scripts 2024-12-29 10:18:55 +01:00
check-NA.R feat: R-minor-sensitive binary builds (full + iterative) (#84) 2026-06-14 08:04:40 +00:00
debug-packages-writing.R feat: R-minor-sensitive binary builds (full + iterative) (#84) 2026-06-14 08:04:40 +00:00
dedupe-audit-issue.R fix(audit): replace arch subsection in place instead of appending duplicates (#138) 2026-07-21 08:51:23 +00:00
detect-duplicates.R feat: R-minor-sensitive binary builds (full + iterative) (#84) 2026-06-14 08:04:40 +00:00
excluded-packages.json feat: R-minor-sensitive binary builds (full + iterative) (#84) 2026-06-14 08:04:40 +00:00
failing-builds-classify.R feat(local): aggregate blocked-on-dependency reporting by dependency (#131) 2026-07-16 21:24:03 +00:00
failing-builds-report.R feat(local): detect dependency-cascade failures generally, not just RcppParallel (#128) 2026-07-16 08:23:54 +00:00
fetch-rebuild-packages-from-issue.R fix(audit): replace arch subsection in place instead of appending duplicates (#138) 2026-07-21 08:51:23 +00:00
find-R-api-packages.sh chore(local): add S3 migration and CRAN-source helper scripts 2026-06-14 13:02:48 +02:00
install-bincraft.R refactor: migrate package installation from pak to uvr (#147) 2026-07-31 12:19:26 +00:00
label-removed-cran-packages.R feat: R-minor-sensitive binary builds (full + iterative) (#84) 2026-06-14 08:04:40 +00:00
last-processed-by-platform.R feat: R-minor-sensitive binary builds (full + iterative) (#84) 2026-06-14 08:04:40 +00:00
migrate-s3-hetzner-to-backblaze.sh chore(local): add S3 migration and CRAN-source helper scripts 2026-06-14 13:02:48 +02:00
missing-cran-packages-db.R feat: R-minor-sensitive binary builds (full + iterative) (#84) 2026-06-14 08:04:40 +00:00
missing-cran-packages.R feat: R-minor-sensitive binary builds (full + iterative) (#84) 2026-06-14 08:04:40 +00:00
missing-packages-in-index.R feat: R-minor-sensitive binary builds (full + iterative) (#84) 2026-06-14 08:04:40 +00:00
packages-to-build.R fix(build): keep source fallbacks out of the S3 package cache (#159) 2026-08-09 16:27:51 +00:00
packages-without-any-binary.R feat: R-minor-sensitive binary builds (full + iterative) (#84) 2026-06-14 08:04:40 +00:00
proposal-tracking-lib.R feat(local): aggregate blocked-on-dependency reporting by dependency (#131) 2026-07-16 21:24:03 +00:00
proposal-tracking.R feat(local): aggregate blocked-on-dependency reporting by dependency (#131) 2026-07-16 21:24:03 +00:00
propose-patches.R feat(local): aggregate blocked-on-dependency reporting by dependency (#131) 2026-07-16 21:24:03 +00:00
query-pkgs-without-old-versions.R chore(local): add S3 migration and CRAN-source helper scripts 2026-06-14 13:02:48 +02:00
r-minor-helpers.R refactor: migrate package installation from pak to uvr (#147) 2026-07-31 12:19:26 +00:00
repair-built-stamp.R fix(index): add a slot repair for a broken Built stamp and retire alpine 3.21 (#150) 2026-08-07 09:15:04 +00:00
test-package-loading.R refactor: migrate package installation from pak to uvr (#147) 2026-07-31 12:19:26 +00:00
trial-build-patch.R fix(local): make trial-build-patch.R detect non-throwing build failures (#134) 2026-07-18 08:37:04 +00:00
trial-build-registry.R fix(local): make the trial-build gate detect non-throwing build failures (#130) 2026-07-16 08:24:03 +00:00
uvr-install.sh fix(ci): refresh the apt index before uvr installs system dependencies (#161) 2026-08-10 06:30:25 +00:00
validate-patches.R feat(local): auto-propose registry patches and track the feedback loop (#117) 2026-07-14 15:03:24 +00:00
weekly-missing-binaries-audit.R fix(audit): count a source fallback as a missing binary (#157) 2026-08-09 10:37:41 +00:00