summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Bonnans <laurent.bonnans@here.com>2019-07-01 17:00:23 +0200
committerLaurent Bonnans <laurent.bonnans@here.com>2019-07-01 17:02:20 +0200
commit2545aa65d581df7bc90a942446520f2ccef8f4b8 (patch)
treecfcabdbf9f6aa6834d60932238733fca1c0812a1
parentf7ba52b35b028d7234402f5b1e79e270a8555584 (diff)
downloadmeta-updater-wip/ci-gitlab.tar.gz
Add ability to supply METADIR to envsetup.shwip/ci-gitlab
So that we can bypass the "relative path from the script" trick that doesn't work with symlinks. Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
-rwxr-xr-xscripts/ci/build.sh1
-rwxr-xr-xscripts/ci/configure.sh2
-rwxr-xr-xscripts/envsetup.sh2
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}
12( 12(
13set +euo pipefail 13set +euo pipefail
14set +x 14set +x
15export METADIR=$(realpath $TEST_REPO_DIR)
15. "${TEST_REPO_DIR}/meta-updater/scripts/envsetup.sh" "${TEST_MACHINE}" "${TEST_BUILD_DIR}" 16. "${TEST_REPO_DIR}/meta-updater/scripts/envsetup.sh" "${TEST_MACHINE}" "${TEST_BUILD_DIR}"
16 17
17bitbake "${IMAGE_NAME}" 18bitbake "${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
25set +euo pipefail 25set +euo pipefail
26set +x 26set +x
27echo ">> Running envsetup.sh" 27echo ">> Running envsetup.sh"
28export METADIR=$(realpath $TEST_REPO_DIR)
28. "$TEST_REPO_DIR/meta-updater/scripts/envsetup.sh" "$TEST_MACHINE" "$TEST_BUILD_DIR" 29. "$TEST_REPO_DIR/meta-updater/scripts/envsetup.sh" "$TEST_MACHINE" "$TEST_BUILD_DIR"
29) 30)
30 31
@@ -35,7 +36,6 @@ SITE_CONF="$TEST_BUILD_DIR/conf/site.conf"
35echo ">> Set common bitbake config options" 36echo ">> Set common bitbake config options"
36cat << EOF > "$SITE_CONF" 37cat << EOF > "$SITE_CONF"
37SANITY_TESTED_DISTROS = "" 38SANITY_TESTED_DISTROS = ""
38SSTATE_MIRRORS ?= "file://.* https://bitbake-cache.atsgarage.com/PATH;downloadfilename=PATH"
39IMAGE_FEATURES += "ssh-server-openssh" 39IMAGE_FEATURES += "ssh-server-openssh"
40 40
41EOF 41EOF
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
21 exit 1 21 exit 1
22fi 22fi
23 23
24METADIR="${SOURCEDIR}/../.." 24METADIR=${METADIR:-${SOURCEDIR}/../..}
25 25
26if [[ ! -f "${BUILDDIR}/conf/local.conf" ]]; then 26if [[ ! -f "${BUILDDIR}/conf/local.conf" ]]; then
27 source "$METADIR/poky/oe-init-build-env" "$BUILDDIR" 27 source "$METADIR/poky/oe-init-build-env" "$BUILDDIR"