fix(ci): refresh the apt index before uvr installs system dependencies #161
Loading…
Reference in a new issue
No description provided.
Delete branch "t3code/fix-ubuntu-glpk-dependency"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Unblocks the ubuntu 26.04 builds without waiting for an image rebuild.
What broke
Neither the package name nor the sysreq mapping is wrong.
libglpk-devis5.0-2build1inuniverse, whichubuntu:resoluteenables by default. What is missing is the apt index: uvr v0.4.5 runsapt-get installwith noapt-get updatebefore it, and every ubuntu build image ends its apt layers withrm -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
igraphand everything depending on it (hugewas the first to fail).Fix
apt-get updatebefore the sync inlocal/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-patchesandweekly-patch-proposalsall reach it, either directly or throughinstall-bincraft.R. The index it populates persists for the rest of the step, so the bincraft-drivenuvr synccalls that follow are covered too.Guarded on
apt-getand non-fatal:apk addfetches 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); build-env-images#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, thenrm -rf /var/lib/apt/lists/*to empty the index again):apt-get install -y libglpk-dev, empty indexE: Unable to locate package libglpk-dev— the reported failure, reproducedapt-get updateCandidate: 5.0-2build1,Components: main universe restricted multiverseigraph+UVR_INSTALL_SYSREQS=1 uvr sync, empty index, uvr with the refreshSetting up libglpk-dev:amd64 (5.0-2build1),System dependencies installed.,Installed 11 package(s)sh -nandshellcheck local/uvr-install.shReverting
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.