From 3d6373874f3972b776dd48e86321b1f8c78cd23b Mon Sep 17 00:00:00 2001 From: bitflash-maintainer Date: Wed, 2 Sep 2026 16:59:30 +0000 Subject: build: say so when apt-get update fails instead of passing over it 34cb6e6 added `apt-get update;` before the install. The semicolon means a failed update does not stop the install, which is the behaviour we want -- one unreachable repository should not block an install the lists already on disk can satisfy -- but it was punctuation rather than a decision, and it was silent. The install then failed several seconds later with "unable to locate package" and nothing tied the two together. Kept it non-fatal, made it explicit with `|| echo`, and wrote the reasoning down next to it. The install itself is still the last command in the branch, so a failed install is still the target's status. Measured all four combinations with apt-get shimmed: a failed update now warns and carries on, a failed install still aborts. --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c5cf31c..ace07d8 100644 --- a/Makefile +++ b/Makefile @@ -115,9 +115,16 @@ deps-linux: deps-apt deps-secp256k1 deps-randomx # This tree only includes two boost headers and links no boost library. The # apt-get update comes first: a fresh image's package lists are empty, and # install then fails on the first name it cannot find. +# +# A failed update is deliberately not fatal: one unreachable repository should +# not block an install the lists already on disk can satisfy. It does say so, +# though -- "unable to locate package" several seconds later is otherwise hard +# to connect back to it. The install is the last command in the branch, so its +# status is the target's, and that one does abort. deps-apt: @if command -v apt-get >/dev/null 2>&1; then \ - $(SUDO) apt-get update; \ + $(SUDO) apt-get update || \ + echo " warning: apt-get update failed, using the package lists on disk"; \ $(SUDO) apt-get install -y build-essential cmake git pkg-config autoconf \ libtool libssl-dev libdb5.3++-dev libsodium-dev nlohmann-json3-dev \ libboost-dev libglfw3-dev libgl-dev python3-pil clang; \ -- cgit v1.2.3