diff options
author | Scott Garman <scott.a.garman@intel.com> | 2011-06-14 18:16:29 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-06-28 13:44:41 +0100 |
commit | 9fc32c40af66768f77a9ecec24389eb8a38a6cae (patch) | |
tree | 9442f52625fff887d180aa2df356bf64cda8b28c /scripts | |
parent | 80beb670257cba98df2660b04307584523f728d6 (diff) | |
download | poky-9fc32c40af66768f77a9ecec24389eb8a38a6cae.tar.gz |
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]
(From OE-Core rev: 9dd2d6b7ee36af6229eb9e9c448eab3a6895a9c5)
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/bitbake | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/bitbake b/scripts/bitbake index 3923421cec..587428c589 100755 --- a/scripts/bitbake +++ b/scripts/bitbake | |||
@@ -16,6 +16,17 @@ done | |||
16 | [ $needpseudo = "0" ] && break | 16 | [ $needpseudo = "0" ] && break |
17 | done | 17 | done |
18 | 18 | ||
19 | # Make sure we're not using python v3.x. This check can't go into | ||
20 | # sanity.bbclass because bitbake's source code doesn't even pass | ||
21 | # parsing stage when used with python v3, so we catch it here so we | ||
22 | # can offer a meaningful error message. | ||
23 | py_v3_check=`/usr/bin/env python --version 2>&1 | grep "Python 3"` | ||
24 | if [ "$py_v3_check" != "" ]; then | ||
25 | echo "Bitbake is not compatible with python v3" | ||
26 | echo "Please set up python v2 as your default python interpreter" | ||
27 | exit 1 | ||
28 | fi | ||
29 | |||
19 | needtar="1" | 30 | needtar="1" |
20 | TARVERSION=`tar --version | head -n 1 | cut -d ' ' -f 4` | 31 | TARVERSION=`tar --version | head -n 1 | cut -d ' ' -f 4` |
21 | float_test() { | 32 | float_test() { |