Refresh apt package lists once in script/bootstrap (closes #115) #116
@@ -21,6 +21,12 @@ fmt-check, and commit.
|
|||||||
|
|
||||||
# Completed Steps
|
# Completed Steps
|
||||||
|
|
||||||
|
- 2026-10-06: The canonical `script/bootstrap` now runs `apt-get update` once,
|
||||||
|
before the first `apt-get install` of a run (issue 115). The Gitea runner
|
||||||
|
image starts with empty package lists, so installing anything it lacks, such
|
||||||
|
as Go, failed with `Unable to locate package`. A repository's own section no
|
||||||
|
longer needs a refresh of its own; `sneak/bsfirehose` and `sneak/dnswatcher`
|
||||||
|
drop theirs at their next re-vendor.
|
||||||
- 2026-10-06: `REPO_POLICIES.md` and both checklists now say that a checkout
|
- 2026-10-06: `REPO_POLICIES.md` and both checklists now say that a checkout
|
||||||
whose `.git` is a file, a linked worktree or a repository checked out as a
|
whose `.git` is a file, a linked worktree or a repository checked out as a
|
||||||
submodule, is the exception to a plain `docker build .` succeeding (issue
|
submodule, is the exception to a plain `docker build .` succeeding (issue
|
||||||
|
|||||||
+9
-1
@@ -19,6 +19,7 @@ YARN_VERSION="1.22.22"
|
|||||||
|
|
||||||
PKGMGR=""
|
PKGMGR=""
|
||||||
SUDO=""
|
SUDO=""
|
||||||
|
APT_UPDATED=""
|
||||||
|
|
||||||
detect_pkgmgr() {
|
detect_pkgmgr() {
|
||||||
[ -n "$PKGMGR" ] && return 0
|
[ -n "$PKGMGR" ] && return 0
|
||||||
@@ -47,7 +48,14 @@ pkg_install() {
|
|||||||
detect_pkgmgr
|
detect_pkgmgr
|
||||||
case "$PKGMGR" in
|
case "$PKGMGR" in
|
||||||
nix) nix-env -iA "nixpkgs.$1" ;;
|
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" ;;
|
brew) brew install "$3" ;;
|
||||||
apk) apk add --no-cache "$4" ;;
|
apk) apk add --no-cache "$4" ;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
Reference in New Issue
Block a user