summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorScott Garman <scott.a.garman@intel.com>2011-06-14 18:16:29 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-06-28 12:09:52 +0100
commit9dd2d6b7ee36af6229eb9e9c448eab3a6895a9c5 (patch)
tree2d7830211e6645658d43b1dadc206dcdf0f4a3be /scripts
parent1609fd2b6582667106a6f065cfa031f68cee7552 (diff)
downloadopenembedded-core-9dd2d6b7ee36af6229eb9e9c448eab3a6895a9c5.tar.gz
openembedded-core-9dd2d6b7ee36af6229eb9e9c448eab3a6895a9c5.tar.bz2
openembedded-core-9dd2d6b7ee36af6229eb9e9c448eab3a6895a9c5.tar.xz
openembedded-core-9dd2d6b7ee36af6229eb9e9c448eab3a6895a9c5.zip
bitbake wrapper: exit if python v3 is detected
Make sure we're not using python v3.x. This check can't go into sanity.bbclass because bitbake's source code doesn't even pass parsing stage when used with python v3, so we catch it here so we can offer a meaningful error message. This fixes bug [YOCTO #1128] Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/bitbake11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/bitbake b/scripts/bitbake
index 3923421ce..587428c58 100755
--- a/scripts/bitbake
+++ b/scripts/bitbake
@@ -16,6 +16,17 @@ done
[ $needpseudo = "0" ] && break
done
+# Make sure we're not using python v3.x. This check can't go into
+# sanity.bbclass because bitbake's source code doesn't even pass
+# parsing stage when used with python v3, so we catch it here so we
+# can offer a meaningful error message.
+py_v3_check=`/usr/bin/env python --version 2>&1 | grep "Python 3"`
+if [ "$py_v3_check" != "" ]; then
+ echo "Bitbake is not compatible with python v3"
+ echo "Please set up python v2 as your default python interpreter"
+ exit 1
+fi
+
needtar="1"
TARVERSION=`tar --version | head -n 1 | cut -d ' ' -f 4`
float_test() {