From faf3da9a75fa40545c8e13b19f6a9d945182f4b9 Mon Sep 17 00:00:00 2001 From: clawbot <35+clawbot@noreply.example.org> Date: Tue, 6 Oct 2026 07:21:30 +0200 Subject: [PATCH] Refresh the package lists before installing in script/bootstrap (closes #508) The CI runner's image starts with empty package lists, so `script/bootstrap`, which `script/cibuild` now runs first, failed to install Go and every CI run stopped there. The apt branch of `pkg_install` now runs `apt-get update` once per run, before its first `apt-get install`, with the same code as the pending shared fix in https://git.eeqj.de/sneak/prompts/pulls/116. Deviation: `script/bootstrap` differs from the vendored copy until the next re-vendor. Unverified: proven by running the CI job in the runner's image; the branch's own CI run waits for the runner outage to clear. 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