From 5b0c835076d1788904947eb6c4220ebed834627a Mon Sep 17 00:00:00 2001 From: Gabriel Valcazar Date: Mon, 17 Nov 2025 11:38:02 +0100 Subject: [PATCH] build.sh: add "--ignore-missing" flag to "repo forall" commands If a previously existing workspace is missing some repos due to "repo sync" errors, any builds re-using that workspace will fail silently when attempting to run "git clean -fdx" on all repos via "repo forall". Ignore missing repos to prevent these situations. Signed-off-by: Gabriel Valcazar --- sdk/build-github.sh | 4 ++-- sdk/build.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk/build-github.sh b/sdk/build-github.sh index f7eab5908..61242c0a7 100755 --- a/sdk/build-github.sh +++ b/sdk/build-github.sh @@ -175,9 +175,9 @@ if pushd "${YOCTO_INST_DIR}"; then fi # shellcheck disable=SC2086 yes "" 2>/dev/null | ${REPO} init --no-repo-verify -u ${MANIFEST_URL} ${repo_revision} - ${REPO} --no-pager forall -j4 -p -c 'git clean -fdx' + ${REPO} --no-pager forall --ignore-missing -j4 -p -c 'git clean -fdx' # shellcheck disable=SC2016 - ${REPO} --no-pager forall -j4 -p -c 'git remote prune $(git remote)' || true + ${REPO} --no-pager forall --ignore-missing -j4 -p -c 'git remote prune $(git remote)' || true # shellcheck disable=SC2086 time ${REPO} sync -d ${MAKE_JOBS} popd diff --git a/sdk/build.sh b/sdk/build.sh index 3d6cecf53..da7cc5ccf 100755 --- a/sdk/build.sh +++ b/sdk/build.sh @@ -206,9 +206,9 @@ if pushd "${YOCTO_INST_DIR}"; then fi # shellcheck disable=SC2086 yes "" 2>/dev/null | ${REPO} init --depth=1 --no-repo-verify -u ${MANIFEST_URL} ${repo_revision} ${DY_MANIFEST:+-m ${DY_MANIFEST}} - ${REPO} --no-pager forall -j4 -p -c 'git clean -fdx' + ${REPO} --no-pager forall --ignore-missing -j4 -p -c 'git clean -fdx' # shellcheck disable=SC2016 - ${REPO} --no-pager forall -j4 -p -c 'git remote prune $(git remote)' || true + ${REPO} --no-pager forall --ignore-missing -j4 -p -c 'git remote prune $(git remote)' || true # shellcheck disable=SC2086 time ${REPO} sync -d ${MAKE_JOBS} popd