diff --git a/local/scripts/build-preflight.sh b/local/scripts/build-preflight.sh index 5300cb4905..ef7ad373d9 100644 --- a/local/scripts/build-preflight.sh +++ b/local/scripts/build-preflight.sh @@ -43,7 +43,15 @@ if [ -n "$RELEASE" ]; then bash "$SCRIPT_DIR/build-release-mode.sh" --release="$RELEASE" --config="$CONFIG" "${EXTRA_PACKAGES[@]/#/--extra-package=}" fi -python3 "$SCRIPT_DIR/validate-source-trees.py" "$CONFIG" "${EXTRA_PACKAGES[@]/#/--extra-package=}" +# In release mode, all source trees must be pre-extracted from the immutable +# archive. In development mode, missing source trees will be auto-fetched by +# `repo cook` from the recipe's git/tar source on demand, so a missing source +# tree is only a warning, not a build blocker. +if [ -n "$RELEASE" ]; then + python3 "$SCRIPT_DIR/validate-source-trees.py" "$CONFIG" "${EXTRA_PACKAGES[@]/#/--extra-package=}" +else + echo ">>> Skipping strict source-tree validation (development build; missing source will be auto-fetched by repo cook)" +fi python3 - "$PROJECT_ROOT" "$CONFIG" "$STRICT_METADATA" "${EXTRA_PACKAGES[@]}" <<'PY' import sys