From 11531ebc4b2ee0a372d67446d2f88d7612c56f10 Mon Sep 17 00:00:00 2001 From: Bilal Godil Date: Wed, 15 Apr 2026 18:41:13 -0700 Subject: [PATCH] fix check_deps: skip docker requirement when SKIP_DOCKER_BUILD=1 Also validate that the pre-built bundle exists before proceeding. --- docker/local-emulator/qemu/build-image.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docker/local-emulator/qemu/build-image.sh b/docker/local-emulator/qemu/build-image.sh index 55d0cb293..1b082d82c 100755 --- a/docker/local-emulator/qemu/build-image.sh +++ b/docker/local-emulator/qemu/build-image.sh @@ -60,9 +60,12 @@ check_deps() { command -v "$qemu_bin" >/dev/null 2>&1 || missing+=("$qemu_bin") done - for cmd in qemu-img curl docker gzip; do + for cmd in qemu-img curl gzip; do command -v "$cmd" >/dev/null 2>&1 || missing+=("$cmd") done + if [ "${SKIP_DOCKER_BUILD:-0}" != "1" ]; then + command -v docker >/dev/null 2>&1 || missing+=("docker") + fi if [ "$EMULATOR_BUILD_SNAPSHOT" = "1" ]; then for cmd in socat zstd; do @@ -659,6 +662,11 @@ for arch in "${TARGET_ARCHS[@]}"; do download_cloud_image "$arch" "$local_base" if [ "${SKIP_DOCKER_BUILD:-0}" = "1" ]; then log "SKIP_DOCKER_BUILD=1: reusing pre-built Docker bundle" + local expected_bundle="$IMAGE_DIR/emulator-${arch}-docker-images.tar.gz" + if [ ! -f "$expected_bundle" ]; then + err "Pre-built bundle not found: $expected_bundle" + exit 1 + fi else build_local_emulator_image "$arch" prepare_bundle_artifacts "$arch"