From aa1227346e086eb397b108a497b36c7aaba10353 Mon Sep 17 00:00:00 2001 From: Jorijn van der Graaf Date: Mon, 24 Aug 2026 04:51:06 +0200 Subject: [PATCH] build.sh: retry the pmbootstrap pip install The pmOS gitlab truncates clones under load (early EOF / invalid index-pack); the pip install runs in the root branch before clone_retry exists, so give it its own 3-attempt loop. Co-Authored-By: Claude Fable 5 --- build.sh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 788a2b6..27d5dfc 100755 --- a/build.sh +++ b/build.sh @@ -36,8 +36,20 @@ if [ "$(id -u)" = 0 ]; then # (pmbootstrap's host-tool checks + image mounting need both) apk add -q git sudo openssl python3 py3-pip multipath-tools util-linux \ tar xz - pip install -q --break-system-packages \ - git+https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git@3.11.1 + # the pmOS gitlab hiccups under crawler load and truncates clones + # ("early EOF"); that should cost a retry, not the run — same reasoning + # as clone_retry below, which isn't defined yet in this root branch + for _i in 1 2 3; do + pip install -q --break-system-packages \ + git+https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git@3.11.1 \ + && break + if [ "$_i" = 3 ]; then + echo "pmbootstrap pip install failed after 3 attempts" >&2 + exit 1 + fi + echo "pmbootstrap pip install failed (attempt $_i/3), retrying in 15s..." >&2 + sleep 15 + done # The container cannot modprobe (no /lib/modules in here), but it doesn't # need to: the host kernel autoloads the loop driver when losetup opens # the static /dev/loop-control node. Make pmbootstrap's explicit