]> code.ossystems Code Review - openembedded-core.git/commitdiff
oe-init-build-env*: Make them actually return failures
authorPeter Kjellerstedt <pkj@axis.com>
Thu, 17 Mar 2016 09:56:28 +0000 (10:56 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 20 Mar 2016 22:57:59 +0000 (22:57 +0000)
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>
oe-init-build-env
oe-init-build-env-memres

index 0b4df1b2dcb592bf9f81d588c2425c81572a5c26..5fe68d1e2a36acd3916e0aa45c4d8f20f45bfa22 100755 (executable)
@@ -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
index 9d393f58127905caf67430b3161b4186bdd93044..9e1425ea83f06e37e854e1de06068533015dd25d 100755 (executable)
@@ -56,11 +56,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"
+
 res=1
 if [ -e bitbake.lock ] && grep : bitbake.lock > /dev/null; then
     BBSERVER=$(cat bitbake.lock) bitbake --status-only