From 2545aa65d581df7bc90a942446520f2ccef8f4b8 Mon Sep 17 00:00:00 2001 From: Laurent Bonnans Date: Mon, 1 Jul 2019 17:00:23 +0200 Subject: Add ability to supply METADIR to envsetup.sh So that we can bypass the "relative path from the script" trick that doesn't work with symlinks. Signed-off-by: Laurent Bonnans --- scripts/ci/build.sh | 1 + scripts/ci/configure.sh | 2 +- scripts/envsetup.sh | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/ci/build.sh b/scripts/ci/build.sh index 6235428..436a00d 100755 --- a/scripts/ci/build.sh +++ b/scripts/ci/build.sh @@ -12,6 +12,7 @@ IMAGE_NAME=${1:-core-image-minimal} ( set +euo pipefail set +x +export METADIR=$(realpath $TEST_REPO_DIR) . "${TEST_REPO_DIR}/meta-updater/scripts/envsetup.sh" "${TEST_MACHINE}" "${TEST_BUILD_DIR}" bitbake "${IMAGE_NAME}" diff --git a/scripts/ci/configure.sh b/scripts/ci/configure.sh index 2101c64..3271585 100755 --- a/scripts/ci/configure.sh +++ b/scripts/ci/configure.sh @@ -25,6 +25,7 @@ mv "$TEST_BUILD_DIR/conf" "$TEST_BUILD_DIR/conf.old" || true set +euo pipefail set +x echo ">> Running envsetup.sh" +export METADIR=$(realpath $TEST_REPO_DIR) . "$TEST_REPO_DIR/meta-updater/scripts/envsetup.sh" "$TEST_MACHINE" "$TEST_BUILD_DIR" ) @@ -35,7 +36,6 @@ SITE_CONF="$TEST_BUILD_DIR/conf/site.conf" echo ">> Set common bitbake config options" cat << EOF > "$SITE_CONF" SANITY_TESTED_DISTROS = "" -SSTATE_MIRRORS ?= "file://.* https://bitbake-cache.atsgarage.com/PATH;downloadfilename=PATH" IMAGE_FEATURES += "ssh-server-openssh" EOF diff --git a/scripts/envsetup.sh b/scripts/envsetup.sh index 6103cf6..5827bc2 100755 --- a/scripts/envsetup.sh +++ b/scripts/envsetup.sh @@ -21,7 +21,7 @@ if [[ $SOURCED -ne 1 ]]; then exit 1 fi -METADIR="${SOURCEDIR}/../.." +METADIR=${METADIR:-${SOURCEDIR}/../..} if [[ ! -f "${BUILDDIR}/conf/local.conf" ]]; then source "$METADIR/poky/oe-init-build-env" "$BUILDDIR" -- cgit v1.2.3-54-g00ecf