build: retry the source-fetching pmbootstrap steps
All checks were successful
image / image (push) Successful in 2h0m56s

Run #25 died at 'pmbootstrap checksum libqmi' on a bare HTTP 503 from
gitlab.freedesktop.org. That host serves three of this pipeline's inputs
(libqmi, modemmanager and now libcamera), and its 503s are transient - it
answered 200 again minutes later - so a hiccup there should cost a retry,
not a 2-hour run.

Same shape as clone_retry, applied to the checksum and build calls that
fetch sources. The kernel and imsd checksums need no retry: their tarballs
are generated locally by this script.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Jorijn van der Graaf 2026-08-16 18:08:17 +02:00
commit 8afa7f99f5

View file

@ -77,6 +77,21 @@ clone_retry() { # clone_retry <dest> <git clone args...>
return 1
}
# Source-fetching pmbootstrap steps hit gitlab.freedesktop.org (libqmi,
# modemmanager AND libcamera all live there), which intermittently 503s —
# run #25 died on exactly that during 'checksum libqmi'. Same reasoning as
# clone_retry: a transient upstream hiccup should cost a retry, not the run.
retry() { # retry <description> <cmd...>
_desc=$1; shift
for _i in 1 2 3; do
"$@" && return 0
echo "$_desc failed (attempt $_i/3), retrying in 30s..." >&2
sleep 30
done
echo "$_desc failed after 3 attempts" >&2
return 1
}
WORK=${FP6IMG_WORK:-$HOME/fp6img-work}
mkdir -p "$WORK"
@ -162,19 +177,19 @@ EOF
pmbootstrap checksum linux-postmarketos-qcom-milos
pmbootstrap checksum imsd
pmbootstrap checksum libqmi
pmbootstrap checksum modemmanager
retry "checksum libqmi" pmbootstrap checksum libqmi
retry "checksum modemmanager" pmbootstrap checksum modemmanager
# pmbootstrap's install-time build plan is not dependency-ordered (it tried
# building modemmanager before the libqmi its makedepends require); build
# the GNSS stack bottom-up explicitly. 'pmbootstrap build' is a no-op when
# the package is already current.
pmbootstrap build --arch aarch64 libqmi
pmbootstrap build --arch aarch64 modemmanager
retry "build libqmi" pmbootstrap build --arch aarch64 libqmi
retry "build modemmanager" pmbootstrap build --arch aarch64 modemmanager
# libcamera is no makedepend of anything here - build it explicitly so the
# patched -r2 exists for the publish step even if the install set resolves
# it before the overlay is considered.
pmbootstrap build --arch aarch64 libcamera
retry "build libcamera" pmbootstrap build --arch aarch64 libcamera
# --- 4. build the image -------------------------------------------------------
# Same default credentials as the official postmarketOS images.