From 1a85179a6d05985afc7c916e666866cfa6aa32af Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Thu, 20 Oct 2016 10:23:15 +0300 Subject: Improve repo fetching Add support for --device and --internal to the mirror creation. Use --optimized-fetch when initializing build env, since the internal repos in gitlab sometimes fail to be fetched, which breaks CI builds. --optimized-fetch pulls from network only if the SHA1 is not found from local repos or from mirror. Change-Id: I427aa7a652bdb63be8f6db8682a9af00c2468ab8 Reviewed-by: Mikko Gronoff Reviewed-by: Risto Avila --- b2qt-init-build-env | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/b2qt-init-build-env b/b2qt-init-build-env index c9c5f46..184af7d 100755 --- a/b2qt-init-build-env +++ b/b2qt-init-build-env @@ -151,7 +151,9 @@ mirror() { mkdir -p .repo/manifests cp ${DIR}/scripts/manifest.xml .repo/manifests/ MANIFEST="manifest.xml" - ${REPO} init ${REPO_URL} -u ${PWD}/.repo/repo -b default -m ${MANIFEST} -g all --mirror + DEVICE=${DEVICE:-all} + get_groups + ${REPO} init ${REPO_URL} -u ${PWD}/.repo/repo -b default -m ${MANIFEST} -g "${PROJECT_GROUPS}" --mirror ${REPO} sync } @@ -172,7 +174,7 @@ init() { MANIFEST="manifest.xml" fi ${REPO} init ${REPO_URL} -u ${PWD}/.repo/repo -b default -m ${MANIFEST} -g "${PROJECT_GROUPS}" ${REFERENCE} - ${REPO} sync + ${REPO} sync --optimized-fetch if [ ! -e "sources/meta-boot2qt" ]; then ln -s ${DIR} sources/meta-boot2qt -- cgit v1.2.3-54-g00ecf