[poky] [PATCH 1/1] bitbake wrapper: exit if python v3 is detected
Scott Garman
scott.a.garman at intel.com
Tue Jun 14 18:42:55 PDT 2011
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 at intel.com>
---
scripts/bitbake | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/scripts/bitbake b/scripts/bitbake
index 3923421..587428c 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() {
--
1.7.1
More information about the poky
mailing list