build: pre-cook honors --upstream; revert wrong source.tar gitignore
Two corrections after finding the Qt offline-source model: 1. The Qt recipes intentionally COMMIT source.tar as the offline source (qtbase/qtsvg/qtshadertools all do). My previous commit wrongly added a local/recipes/**/source.tar ignore rule; revert it -- source.tar is durable here, only source/ is the fork model. 2. Real deficiency: the pre-cook offline decision honored only the REDBEAR_ALLOW_UPSTREAM env var, while the main `make live` phase also goes online for the --upstream flag (ALLOW_UPSTREAM=1). So `--upstream` alone left the pre-cook OFFLINE but the main phase ONLINE -- a package missing its source.tar cache (e.g. right after the stale 6.11.0 tars were purged) failed the pre-cook with "Opening file for blake3 failed ... source.tar: No such file". Make the pre-cook honor ALLOW_UPSTREAM too, matching the main phase.
This commit is contained in:
@@ -928,16 +928,20 @@ for pkg in $PRECOOK_PKGS; do
|
||||
if [ ! -f "$PROJECT_ROOT/repo/x86_64-unknown-redox/$pkg.pkgar" ]; then
|
||||
echo " cooking $pkg..."
|
||||
log=$(mktemp)
|
||||
# Pre-cook offline/upstream policy must match the main build phase:
|
||||
# the previous hardcoded COOKBOOK_OFFLINE=false meant pre-cook could
|
||||
# fetch packages the main phase refused to use, leaving the repo in
|
||||
# an inconsistent state when ALLOW_UPSTREAM was not set.
|
||||
case "${REDBEAR_ALLOW_UPSTREAM:-0}" in
|
||||
1)
|
||||
PRECOOK_OFFLINE=false ;;
|
||||
*)
|
||||
PRECOOK_OFFLINE=true ;;
|
||||
esac
|
||||
# Pre-cook offline/upstream policy must match the main build phase
|
||||
# (see the `make live` dispatch below). The main phase goes online when
|
||||
# EITHER the REDBEAR_ALLOW_UPSTREAM env var is 1 OR the --upstream flag
|
||||
# (ALLOW_UPSTREAM=1) is passed; it goes offline in release mode. The
|
||||
# pre-cook previously honored only REDBEAR_ALLOW_UPSTREAM, so a plain
|
||||
# `--upstream` invocation left the pre-cook OFFLINE while the main phase
|
||||
# was ONLINE — any package missing its source.tar cache (e.g. after a
|
||||
# version bump) then failed the pre-cook with "Opening file for blake3
|
||||
# failed ... source.tar: No such file". Honor ALLOW_UPSTREAM here too.
|
||||
if [ "${REDBEAR_ALLOW_UPSTREAM:-0}" = "1" ] || [ "${ALLOW_UPSTREAM:-0}" -eq 1 ]; then
|
||||
PRECOOK_OFFLINE=false
|
||||
else
|
||||
PRECOOK_OFFLINE=true
|
||||
fi
|
||||
if [ -n "${REDBEAR_RELEASE:-}" ]; then
|
||||
PRECOOK_OFFLINE=true
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user