diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2012-03-13 12:38:04 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-14 13:17:40 +0000 |
commit | 50e4d4c3123dff43bd4abecccae1f3ae13784e9b (patch) | |
tree | 2be4c1471eda8982c7308dba289a914194dca17d /scripts | |
parent | 5494bfca38c8cf15ffb1cf68c3b61082eca56aae (diff) | |
download | poky-50e4d4c3123dff43bd4abecccae1f3ae13784e9b.tar.gz |
scripts/bitbake: ensure user is in build directory
If the user is in any directory other than $BUILDDIR when the bitbake
wrapper script is run, then show an error an exit.
Fixes [YOCTO #2071].
(From OE-Core rev: b4df1c7c79b5c801658bcf890ba3a8eab3d83189)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/bitbake | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/bitbake b/scripts/bitbake index dda3b261de..45c869799d 100755 --- a/scripts/bitbake +++ b/scripts/bitbake | |||
@@ -47,6 +47,11 @@ float_test() { | |||
47 | # but earlier versions do not | 47 | # but earlier versions do not |
48 | float_test "$TARVERSION > 1.23" && needtar="0" | 48 | float_test "$TARVERSION > 1.23" && needtar="0" |
49 | 49 | ||
50 | if [ "`pwd`" != "$BUILDDIR" ] ; then | ||
51 | echo "BitBake must be run from your build directory: $BUILDDIR" | ||
52 | exit 1 | ||
53 | fi | ||
54 | |||
50 | buildpseudo="1" | 55 | buildpseudo="1" |
51 | if [ $needpseudo = "1" ] && [ -e "$BUILDDIR/pseudodone" ]; then | 56 | if [ $needpseudo = "1" ] && [ -e "$BUILDDIR/pseudodone" ]; then |
52 | PSEUDOBINDIR=`cat $BUILDDIR/pseudodone` | 57 | PSEUDOBINDIR=`cat $BUILDDIR/pseudodone` |