summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2012-03-13 12:38:04 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-14 13:12:42 +0000
commitb4df1c7c79b5c801658bcf890ba3a8eab3d83189 (patch)
tree8958603ace46e12ca419b383fbcf542af63ff5ef
parent0030644f4890ca25894916189470317650ec8246 (diff)
downloadopenembedded-core-b4df1c7c79b5c801658bcf890ba3a8eab3d83189.tar.gz
openembedded-core-b4df1c7c79b5c801658bcf890ba3a8eab3d83189.tar.bz2
openembedded-core-b4df1c7c79b5c801658bcf890ba3a8eab3d83189.tar.xz
openembedded-core-b4df1c7c79b5c801658bcf890ba3a8eab3d83189.zip
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]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-rwxr-xr-xscripts/bitbake5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/bitbake b/scripts/bitbake
index dda3b261d..45c869799 100755
--- a/scripts/bitbake
+++ b/scripts/bitbake
@@ -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`