aboutsummaryrefslogtreecommitdiff
path: root/oe-init-build-env
diff options
context:
space:
mode:
authorPeter Kjellerstedt <pkj@axis.com>2016-03-17 10:56:28 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-20 22:57:59 +0000
commit40764c7039f1ee161916d4fbf7dfe15fb964030e (patch)
treed7be9bfceffca2ed227f804d8bad164cf50aa6a0 /oe-init-build-env
parent1295d413f27941d0763a3d58982378738bf3ca06 (diff)
downloadopenembedded-core-40764c7039f1ee161916d4fbf7dfe15fb964030e.zip
openembedded-core-40764c7039f1ee161916d4fbf7dfe15fb964030e.tar.gz
openembedded-core-40764c7039f1ee161916d4fbf7dfe15fb964030e.tar.bz2
oe-init-build-env*: Make them actually return failures
If either of the internal scripts (oe-buildenv-internal and oe-setup-builddir) failed, oe-init-build-env (and oe-init-build-env-memres) would still return success. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'oe-init-build-env')
-rwxr-xr-xoe-init-build-env10
1 files changed, 7 insertions, 3 deletions
diff --git a/oe-init-build-env b/oe-init-build-env
index 0b4df1b..5fe68d1 100755
--- a/oe-init-build-env
+++ b/oe-init-build-env
@@ -48,11 +48,15 @@ fi
unset THIS_SCRIPT
export OEROOT
-. $OEROOT/scripts/oe-buildenv-internal && \
- TEMPLATECONF="$TEMPLATECONF" $OEROOT/scripts/oe-setup-builddir && \
- [ -n "$BUILDDIR" ] && cd "$BUILDDIR"
+. $OEROOT/scripts/oe-buildenv-internal &&
+ TEMPLATECONF="$TEMPLATECONF" $OEROOT/scripts/oe-setup-builddir || {
+ unset OEROOT
+ return 1
+}
unset OEROOT
+[ -z "$BUILDDIR" ] || cd "$BUILDDIR"
+
# Shutdown any bitbake server if the BBSERVER variable is not set
if [ -z "$BBSERVER" ] && [ -f bitbake.lock ]; then
grep ":" bitbake.lock > /dev/null && BBSERVER=$(cat bitbake.lock) bitbake --status-only