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>
This commit is contained in:
Paul Eggleton 2012-03-13 12:38:04 +00:00 committed by Richard Purdie
parent 5494bfca38
commit 50e4d4c312
1 changed files with 5 additions and 0 deletions

View File

@ -47,6 +47,11 @@ float_test() {
# but earlier versions do not
float_test "$TARVERSION > 1.23" && needtar="0"
if [ "`pwd`" != "$BUILDDIR" ] ; then
echo "BitBake must be run from your build directory: $BUILDDIR"
exit 1
fi
buildpseudo="1"
if [ $needpseudo = "1" ] && [ -e "$BUILDDIR/pseudodone" ]; then
PSEUDOBINDIR=`cat $BUILDDIR/pseudodone`