Bug 128 - bitbake fails to execute with Python 2.4.3
Summary: bitbake fails to execute with Python 2.4.3
Status: RESOLVED FIXED
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: meta-yocto (show other bugs)
Version: 0.9
Hardware: x86 Multiple
: Low normal
Target Milestone: 1.0 M1
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2010-07-19 10:01 UTC by Mark Hatle
Modified: 2011-02-01 09:54 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Hatle 2010-07-19 10:01:53 UTC
There are still a large number of python 2.4.3 installations, however the current bitbake fails to execute on this version of python.

It's expected that bitbake will execute and display the error message:

Sorry, python 2.6.0 or later is requried for this version of bitbake.

Instead what happens is:


  File "/msp-lpggp12/mhatle/git/poky-contrib/bitbake//bin/bitbake", line 203
    except Exception as e:
                      ^
SyntaxError: invalid syntax


It appears the 'as' clause of exception handing is not implemented in 2.4.

Similar, if you change the 'as' to a ',', you get another error on line 207.

The 'finally' clause of the try was not allowed until 2.5.  So the exception handling and the finally clause may have to be re-evaluated in order to generate the proper error message.
Comment 1 Aleksandr Koltsoff 2011-01-28 01:19:38 UTC
The same problem also applies to python 2.5 installs (2.5.2 in Ubuntu Hardy for example).
Comment 2 Aleksandr Koltsoff 2011-01-28 03:45:38 UTC
bitbake in master (as of 2011-01-28) has fixed the root issue, and displays
"RuntimeError: Sorry, python 2.6.0 or later is required for this version of
bitbake" for both python 2.5.2 and 2.4.5. (see http://bugzilla.pokylinux.org/show_bug.cgi?id=629 ).
Comment 3 Richard Purdie 2011-02-01 09:54:33 UTC
This is resolved in master so marking as resolved.