summaryrefslogtreecommitdiffstats
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 23:12:30 +0000
commitdd5f2f7275a2f36e9dd8979fbdf1e367ad579147 (patch)
tree0b92377d17e95bdd0889136b2ae512eb350fdf76
parentea28de6d39b4ff0db51a3f6ae1315aae7cb1260c (diff)
downloadpoky-dd5f2f7275a2f36e9dd8979fbdf1e367ad579147.tar.gz
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. (From OE-Core rev: 40764c7039f1ee161916d4fbf7dfe15fb964030e) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xoe-init-build-env10
-rwxr-xr-xoe-init-build-env-memres10
2 files changed, 14 insertions, 6 deletions
diff --git a/oe-init-build-env b/oe-init-build-env
index 0b4df1b2dc..5fe68d1e2a 100755
--- a/oe-init-build-env
+++ b/oe-init-build-env
@@ -48,11 +48,15 @@ fi
48unset THIS_SCRIPT 48unset THIS_SCRIPT
49 49
50export OEROOT 50export OEROOT
51. $OEROOT/scripts/oe-buildenv-internal && \ 51. $OEROOT/scripts/oe-buildenv-internal &&
52 TEMPLATECONF="$TEMPLATECONF" $OEROOT/scripts/oe-setup-builddir && \ 52 TEMPLATECONF="$TEMPLATECONF" $OEROOT/scripts/oe-setup-builddir || {
53 [ -n "$BUILDDIR" ] && cd "$BUILDDIR" 53 unset OEROOT
54 return 1
55}
54unset OEROOT 56unset OEROOT
55 57
58[ -z "$BUILDDIR" ] || cd "$BUILDDIR"
59
56# Shutdown any bitbake server if the BBSERVER variable is not set 60# Shutdown any bitbake server if the BBSERVER variable is not set
57if [ -z "$BBSERVER" ] && [ -f bitbake.lock ]; then 61if [ -z "$BBSERVER" ] && [ -f bitbake.lock ]; then
58 grep ":" bitbake.lock > /dev/null && BBSERVER=$(cat bitbake.lock) bitbake --status-only 62 grep ":" bitbake.lock > /dev/null && BBSERVER=$(cat bitbake.lock) bitbake --status-only
diff --git a/oe-init-build-env-memres b/oe-init-build-env-memres
index 9d393f5812..9e1425ea83 100755
--- a/oe-init-build-env-memres
+++ b/oe-init-build-env-memres
@@ -56,11 +56,15 @@ fi
56unset THIS_SCRIPT 56unset THIS_SCRIPT
57 57
58export OEROOT 58export OEROOT
59. $OEROOT/scripts/oe-buildenv-internal && \ 59. $OEROOT/scripts/oe-buildenv-internal &&
60 TEMPLATECONF="$TEMPLATECONF" $OEROOT/scripts/oe-setup-builddir && \ 60 TEMPLATECONF="$TEMPLATECONF" $OEROOT/scripts/oe-setup-builddir || {
61 [ -n "$BUILDDIR" ] && cd "$BUILDDIR" 61 unset OEROOT
62 return 1
63}
62unset OEROOT 64unset OEROOT
63 65
66[ -z "$BUILDDIR" ] || cd "$BUILDDIR"
67
64res=1 68res=1
65if [ -e bitbake.lock ] && grep : bitbake.lock > /dev/null; then 69if [ -e bitbake.lock ] && grep : bitbake.lock > /dev/null; then
66 BBSERVER=$(cat bitbake.lock) bitbake --status-only 70 BBSERVER=$(cat bitbake.lock) bitbake --status-only