Mark Charlebois reported the following: Using Poky from Arch Linux (read that Arch is not supported, but that comments on how well it works are welcome) Had to install sudo Found docs for Arch Linux and OE: http://wiki.openembedded.net/index.php/OEandYourDistro#Arch_Linux_.28Duke.29 Installed packages: pacman -S patch make sed python m4 bison cvs quilt sgmltools-lite docbook-xml \ xmlto pcre boost jade git texinfo texi2html help2man subversion chrpath quilt is not in the Arch packages. Had to be built from AUR $ bitbake poky-image-sato Pseudo is not present but is required, building this first before the main build File "/shared/yocto/poky-bernard-5.0/bitbake/bin/bitbake", line 35 except RuntimeError, exc: ^ SyntaxError: invalid syntax This error message does not indicate that the problem was due to missing quilt. So a sanity check could be added for this.
The exception raised by quilt being missing is invalid syntax in Python. try: stuff except MyError as e: print(e) is the correct syntax for exception handling, so the error is correct though still not useful.
As an aside re the support of Arch, iirc the use Python 3 by default.
Ok, so this bug doesn't have to do with quilt after all - we build quilt as quilt-native, and I don't have a host version installed on any of my build machines. I've tested that pointing bitbake to a python v3 interpreter will result in the same error Mark ran into, and that is what we need to add a check for. We've checked for old versions of python, but not v3-only ones.
Progress update: This is not as simple as adding a python version check in sanity.bbclass, because the v3 python interpreter cannot even parse all of the bitbake code. I'm diving through various layers of making bitbake work on python v2 and at least superficially parse on v3 so it can get to the point of running the sanity test.
A hackier alternative here might be to do a python v3 test in the bitbake wrapper script?
Thanks for the suggestion, Joshua. It looks like that is the only feasible way to fix this. The impasse I've reached is that module importing from within your own package has changed, and the new syntax of specifying things is not backward-compatible. So it does not appear that I can pull this off in such a way that both v2 and v3 versions of python will work - even just to get the code to pass the parsing stage.
Fixed in poky master and oe-core master: http://git.pokylinux.org/cgit/cgit.cgi/poky/commit/?id=9fc32c40af66768f77a9ecec24389eb8a38a6cae http://cgit.openembedded.org/cgit.cgi/openembedded-core/commit/?id=9dd2d6b7ee36af6229eb9e9c448eab3a6895a9c5