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 <noreply@anthropic.com>
This commit is contained in:
parent
eb13c18ea8
commit
aa1227346e
1 changed files with 14 additions and 2 deletions
14
build.sh
14
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
|
||||
# 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
|
||||
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue