diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2011-12-14 17:35:14 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-12-15 14:36:22 +0000 |
commit | 10a00416a8b1b6fb65bd4c7280d86188c1c58eaa (patch) | |
tree | a9c1d4468cae7eec592cc97a5428be295e2bebd8 | |
parent | 44d8f38a5ee11a993986bbcb3e8b132de9c0264a (diff) | |
download | poky-10a00416a8b1b6fb65bd4c7280d86188c1c58eaa.tar.gz |
scripts/bitbake: add a version >= 2.6 check
Unfortunately we now have code in BitBake which is parsed before the
current version check and is incompatible with Python < 2.6. Rather than
fixing this and being eternally vigilant for >= 2.6 feature usage, just
add a version check to the wrapper script.
(From OE-Core rev: 9b8a48efa3b80fea34efa51de44d10ff2b1e3193)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-x | scripts/bitbake | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/bitbake b/scripts/bitbake index 587428c589..1c8d4ebe19 100755 --- a/scripts/bitbake +++ b/scripts/bitbake | |||
@@ -27,6 +27,15 @@ if [ "$py_v3_check" != "" ]; then | |||
27 | exit 1 | 27 | exit 1 |
28 | fi | 28 | fi |
29 | 29 | ||
30 | # Similarly, we now have code that doesn't parse correctly with older | ||
31 | # versions of Python, and rather than fixing that and be eternally | ||
32 | # vigilant for any other new feature use, just check the version here. | ||
33 | py_v26_check=`python -c 'import sys; print sys.version_info >= (2,6,0)'` | ||
34 | if [ "$py_v26_check" != "True" ]; then | ||
35 | echo "BitBake requires Python 2.6 or later" | ||
36 | exit 1 | ||
37 | fi | ||
38 | |||
30 | needtar="1" | 39 | needtar="1" |
31 | TARVERSION=`tar --version | head -n 1 | cut -d ' ' -f 4` | 40 | TARVERSION=`tar --version | head -n 1 | cut -d ' ' -f 4` |
32 | float_test() { | 41 | float_test() { |