build: limit amount of data cloned for each repository

This commit fixes an intermittent issue when we are cloning several
repos with a huge history, throwing an unexpected error.

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
This commit is contained in:
Arturo Buzarra 2020-07-27 09:18:55 +02:00
parent 3fdb880213
commit 867483e924
2 changed files with 2 additions and 2 deletions

View File

@ -154,7 +154,7 @@ if pushd ${YOCTO_INST_DIR}; then
error "Revision \"${DY_REVISION}\" not found"
fi
fi
yes "" 2>/dev/null | ${REPO} init --no-repo-verify -u ${MANIFEST_URL} ${repo_revision}
yes "" 2>/dev/null | ${REPO} init --depth=1 --no-repo-verify -u ${MANIFEST_URL} ${repo_revision}
${REPO} forall -p -c 'git remote prune $(git remote)'
time ${REPO} sync -d ${MAKE_JOBS}
popd

View File

@ -209,7 +209,7 @@ if pushd ${YOCTO_INST_DIR}; then
error "Revision \"${DY_REVISION}\" not found"
fi
fi
yes "" 2>/dev/null | ${REPO} init --no-repo-verify -u ${MANIFEST_URL} ${repo_revision}
yes "" 2>/dev/null | ${REPO} init --depth=1 --no-repo-verify -u ${MANIFEST_URL} ${repo_revision}
${REPO} forall -p -c 'git remote prune $(git remote)'
time ${REPO} sync -d ${MAKE_JOBS}
popd