From 516bd5fe4ba74f9972bfe88d3f132cfd25132474 Mon Sep 17 00:00:00 2001 From: sneak Date: Tue, 6 Oct 2026 04:29:29 +0000 Subject: [PATCH] Refresh the package lists before installing in script/bootstrap (closes #508) The CI runner image starts with empty package lists, so installing Go with apt-get failed with "Unable to locate package golang". The apt branch of pkg_install now runs apt-get update once per run, before the first apt-get install, with the same code as the shared copy in sneak/prompts PR 116. Deviation from the vendored copy, replaced by the next re-vendor once that PR lands. Model: opus-5-5 --- script/bootstrap | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/script/bootstrap b/script/bootstrap index b7db190..529b99c 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -11,6 +11,7 @@ ROOT="$(cd "$(dirname "$0")/.." && pwd -P)" PKGMGR="" SUDO="" +APT_UPDATED="" detect_pkgmgr() { [ -n "$PKGMGR" ] && return 0 @@ -39,7 +40,14 @@ pkg_install() { detect_pkgmgr case "$PKGMGR" in nix) nix-env -iA "nixpkgs.$1" ;; - apt) $SUDO env DEBIAN_FRONTEND=noninteractive apt-get install -y "$2" ;; + apt) + # Package lists may be empty (fresh images); refresh once per run. + if [ -z "$APT_UPDATED" ]; then + $SUDO env DEBIAN_FRONTEND=noninteractive apt-get update + APT_UPDATED=1 + fi + $SUDO env DEBIAN_FRONTEND=noninteractive apt-get install -y "$2" + ;; brew) brew install "$3" ;; apk) apk add --no-cache "$4" ;; esac -- 2.54.0