Skip to content

Commit 4cbdffd

Browse files
committed
fix(os): retry pinned OVMF submodule fetches
1 parent 43b27d7 commit 4cbdffd

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

os/mkosi/components/ovmf/ovmf-build.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,14 @@ if [[ ! -d $src/.git ]]; then
1919
fi
2020
git -C "$src" fetch -q --depth=1 origin "$REV"
2121
git -C "$src" checkout -q --detach FETCH_HEAD
22-
git -C "$src" submodule update --init --recursive --depth=1
22+
for attempt in 1 2 3; do
23+
if git -C "$src" submodule update --init --recursive --depth=1; then
24+
break
25+
fi
26+
(( attempt < 3 )) || { echo 'failed to fetch OVMF submodules' >&2; exit 1; }
27+
git -C "$src" submodule sync --recursive
28+
sleep $((attempt * 5))
29+
done
2330
git -C "$src" reset -q --hard "$REV"
2431
patch -d "$src" -p1 --forward --fuzz=0 < \
2532
"$ROOT/os/yocto/layers/meta-dstack/recipes-core/dstack-ovmf/dstack-ovmf/0004-Reproduciable.patch"

0 commit comments

Comments
 (0)