path: root/oe-init-build-env
diff options
authorDexuan Cui <>2011-08-02 14:08:32 +0800
committerRichard Purdie <>2011-08-02 14:32:10 +0100
commitbe2a2764d8ceb398d81714661e6f199c8b11946c (patch)
treea1a704af82c22a85fd1b3191a0118518604ac4b8 /oe-init-build-env
parent68bd81506fd258d8dfae077a719982f91c56dceb (diff)
oe-init-build-env, scripts/oe-buildenv-internal: add error detecting for $BDIR
[YOCTO #671] "readlink -f" in Ubuntu 10.04 is buggy: it doesn't ignore a trailing / (e.g., "readlink -f /tmp/non-existent-dir/" returns nothing, but according to it should do that -- hence we get bug 671. It seems Ubuntu 10.10 or even later Ubuntu 11.04, and other Linux distributions(e.g., Open Suse 11.4) haven't such an issue. So I think we should detect this and ask Ubuntu 10.04 users to avoid supply a path with trailing slash here. Moreever, I also add the detection of non-existent path, e.g., source oe-init-build-env /non-existent-dir/build can be detected and we'll print an error msg. And, if we get errors in oe-buildenv-internal, we should stop the script and shouldn't further run. (From OE-Core rev: 651ccb3b031d9ccb8331505a51171372002230d9) Signed-off-by: Dexuan Cui <> Signed-off-by: Richard Purdie <>
Diffstat (limited to 'oe-init-build-env')
1 files changed, 3 insertions, 3 deletions
diff --git a/oe-init-build-env b/oe-init-build-env
index 77332a7..cc30a3b 100755
--- a/oe-init-build-env
+++ b/oe-init-build-env
@@ -35,10 +35,10 @@ else
OEROOT=`readlink -f "$OEROOT"`
export OEROOT
- . $OEROOT/scripts/oe-buildenv-internal
- $OEROOT/scripts/oe-setup-builddir
+ . $OEROOT/scripts/oe-buildenv-internal && \
+ $OEROOT/scripts/oe-setup-builddir && \
+ [ -n "$BUILDDIR" ] && cd $BUILDDIR
unset OEROOT
unset BBPATH
- [ -n "$BUILDDIR" ] && cd $BUILDDIR
OpenPOWER on IntegriCloud