From fd90ce9fddbb91262ee1a274e6e53bef85e2fef8 Mon Sep 17 00:00:00 2001 From: vasilito Date: Sun, 12 Jul 2026 18:13:31 +0300 Subject: [PATCH] fix: widen recipe.toml auto-repair to cover recipes/ tree Broken recipe.toml corruption also affects tracked symlinks in recipes/ tree (e.g. recipes/libs/libxau/recipe.toml). Extended the auto-repair find to cover both local/recipes/ and recipes/. --- local/scripts/build-preflight.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/local/scripts/build-preflight.sh b/local/scripts/build-preflight.sh index 28522acb7d..4f3d7e0aff 100755 --- a/local/scripts/build-preflight.sh +++ b/local/scripts/build-preflight.sh @@ -33,13 +33,14 @@ cd "$PROJECT_ROOT" echo ">>> Build preflight: $CONFIG" -# Defensive: detect and repair broken recipe.toml symlinks in local/recipes/. -# These are tracked as regular files in git — a broken symlink means corruption. -broken_recipes=$(find local/recipes -name "recipe.toml" -xtype l 2>/dev/null | wc -l) +# Defensive: detect and repair broken recipe.toml symlinks. +# These are tracked files — broken symlinks mean corruption from unknown source. +# Check both local/recipes/ (regular files) and recipes/ (tracked symlinks). +broken_recipes=$(find local/recipes recipes -name "recipe.toml" -xtype l 2>/dev/null | wc -l) if [ "$broken_recipes" -gt 0 ]; then echo ">>> WARNING: $broken_recipes broken recipe.toml symlinks detected — auto-repairing from git..." >&2 - find local/recipes -name "recipe.toml" -xtype l -exec git checkout -q -- {} \; 2>/dev/null - remaining=$(find local/recipes -name "recipe.toml" -xtype l 2>/dev/null | wc -l) + find local/recipes recipes -name "recipe.toml" -xtype l -exec git checkout -q -- {} \; 2>/dev/null + remaining=$(find local/recipes recipes -name "recipe.toml" -xtype l 2>/dev/null | wc -l) if [ "$remaining" -gt 0 ]; then echo ">>> ERROR: $remaining recipe.toml files could not be restored. Build may fail." >&2 else