When building, bitbake often fails to parse in my configuration. The exact message is: ERROR: Error Method already seen: get_policyconfigarch in' libselinux_2.1.9.bb' now in 'libselinux_git.bb' In order to reproduce this problem: Host system - Fedora 16 - i686 (32-bit) - Core 2 Duo system Python version 2.7.2 OE-core master -- commit: e3113827810e98eb1b012f0b280fb917199704c1 Bitbake master -- commit: 56c1ab18fcaf4ac245dcb412ed55e8e0af07883b meta-selinux master -- commit: a424d778f3b92a315553383ac1a6bcca682f6007 Use . ./oe-init-build-env to setup a default configuration, modify it: BB_NUMBER_THREADS = "2" PARALLEL_MAKE = "-j 2" Add the meta-selinux to the bblayers.conf file: # LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf # changes incompatibly LCONF_VERSION = "4" BBFILES ?= "" BBLAYERS ?= " \ /home/buildbot/temp-fray/openembedded-core/meta \ /home/buildbot/temp-fray/openembedded-core/meta-selinux \ " I then ran bitbake in a loop: while bitbake -e libselinux ; do rm -rf tmp-eglibc ; done Within 2-3 runs, I usually receive the failure message indicated above. (This issue was also reproduced with the version of bitbake and oe-core in the Yocto Project 1.2 release.) Note: I was -not- able to reproduce this problem w/ Python 2.6.x that comes with CentOS 6.2, or a Fedora 13 machine running a similar python version.
I have checked in a workaround for this issue to the meta-selinux layer. When attempting to reproduce this, be sure you match the commits in the original reproducer. Commit: df4662758708ec030852ba3de007e021f0c4ad49 -- workaround for this issue.
This is not so much a bug but bitbake telling you that you're doing something invalid. Whilst its not particularly obvious, python functions share a global namespace since this is what BitBake has always done. Bitbake therefore errors if you try and add the same funciton name from different contexts. The solution is to put common functions within a .inc file. I agree the error message is less than intuative...
I've improved the error message in master to resolve this issue: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=4ff6160d909e2a39e357c8a51f37d803dab64d5d
Verified.