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 <gabriel.valcazar@digi.com>
This commit is contained in:
Gabriel Valcazar 2025-11-17 11:38:02 +01:00
parent e2fb5c3dd7
commit 5b0c835076
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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