diff --git a/local/uvr-install.sh b/local/uvr-install.sh index 14b7f78..c5d37d3 100755 --- a/local/uvr-install.sh +++ b/local/uvr-install.sh @@ -87,4 +87,23 @@ cd "$project_dir" # --no-install: resolve and lock only. The install happens in the sync below, # which is the only command that honours --library. "$uvr_bin" add --no-install "$@" + +# TEMPORARY (drop once the images ship a uvr above v0.4.5): the sync below runs +# `apt-get install` for every resolved system dependency without refreshing the +# index first, and the ubuntu build images end their apt layers with +# `rm -rf /var/lib/apt/lists/*`. With no index apt cannot resolve a package that +# exists and is enabled, so `igraph needs: libglpk-dev` fails the whole build +# with `E: Unable to locate package libglpk-dev` on ubuntu 26.04. +# +# Fixed upstream in `e491b2e`, tagged one day after v0.4.5 (nbafrank/uvr#250), +# and the images pick it up via build-env-images#23 — but only after an image +# rebuild is triggered, which is why this runs here too. +# +# apt only: `apk add` fetches its index implicitly and dnf refreshes expired +# metadata on its own. Non-fatal, since a refresh failure still leaves whatever +# index is already there, and the install's own error is the more actionable one. +if command -v apt-get >/dev/null 2>&1; then + apt-get update -qq || echo "warning: apt-get update failed; continuing" >&2 +fi + "$uvr_bin" sync --library "$target_lib" --install-system-deps