I thought this was a complicated bug to reproduce, so I will try to give some context before to explain what is happening: When launching a multiconfig build, the metadata is parsed n+1 times (where n is the number of configurations that will be built), there is a respective local.conf for each configuration (including the main local.conf, which I will call default). Which means that if we enable a multiconfig build, and only build one configuration, we will have two local.conf files, the default one and the one that contains the configuration that we want to build, e.g. conf/local.conf and conf/multiconfig/arm.conf. Both configurations may contain INHERITs, either on local.conf or any other conf files that are parsed at parse time. Some of these INHERITs may contain event handlers, e.g. buildhistory. So, if the default configuration contains INHERIT += "buildhistory" for example, the default configuration will have an event called buildhistory_eventhandler(), the first thing this event does is: e.data.getVar('BUILDHISTORY_FEATURES').strip(), so it tries to access the data that was parsed and get the variable BUILDHISTORY_FEATURES from it, this variable is literally the first thing that is declared on buildhistory.bbclass. Assuming the other configuration, does not INHERIT buildhistory, that configuration won't have parsed the buildhistory.bbclass file, hence the variable BUILDHISTORY_FEATURES won't be declared for it. The problem is, that the event buildhistory_eventhandler(), is executed by bitbake for that configuration as well, resulting in the following error: ERROR: Execution of event handler 'buildhistory_eventhandler' failed Traceback (most recent call last): File "meta/classes/buildhistory.bbclass", line 801, in buildhistory_eventhandler(e=<bb.event.BuildStarted object at 0x7f5e529c40b8>): python buildhistory_eventhandler() { > if e.data.getVar('BUILDHISTORY_FEATURES').strip(): reset = e.data.getVar("BUILDHISTORY_RESET") AttributeError: 'NoneType' object has no attribute 'strip' ERROR: Command execution failed: Traceback (most recent call last): File "bitbake/lib/bb/command.py", line 116, in runAsyncCommand commandmethod(self.cmds_async, self, options) File "bitbake/lib/bb/command.py", line 608, in buildTargets command.cooker.buildTargets(pkgs_to_build, task) File "bitbake/lib/bb/cooker.py", line 1479, in buildTargets bb.event.fire(bb.event.BuildStarted(buildname, ntargets), self.databuilder.mcdata[mc]) File "bitbake/lib/bb/event.py", line 225, in fire fire_class_handlers(event, d) File "bitbake/lib/bb/event.py", line 134, in fire_class_handlers execute_handler(name, handler, event, d) File "bitbake/lib/bb/event.py", line 106, in execute_handler ret = handler(event) File "meta/classes/buildhistory.bbclass", line 801, in buildhistory_eventhandler if e.data.getVar('BUILDHISTORY_FEATURES').strip(): AttributeError: 'NoneType' object has no attribute 'strip' Which basically means that the variable BUILDHISTORY_FEATURES doesnt exist for this build (which is ok). Interestingly, this cannot be reproduced if the default configuration (local.conf), INHERITs buildhistory,it HAS to INHERIT it from one of the other config files that were parsed, for example the distro.conf (poky.conf). I created a contrib branch to make it easier to reproduce, on which I create a copy of poky.conf called poky-mctest.conf that is literally just a copy of poky.conf with an extra INHERIT += "buildhistory" and added some warnings for debugging purposes: http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=aehs29/multiconfig_events_bug As a summary, to reproduce this, the default/main local.conf should contain the following: BBMULTICONFIG ?= "arm" # only one multiconfig build should be enough DISTRO= "poky-mctest" There also has to be a matching conf file for the arm build on conf/multiconfig/arm.conf, that NEEDS to be building a different DISTRO, so it doesnt parse the same extra buildhistory.bbclass as the default will: DISTRO="poky" MACHINE="qemuarm" TMPDIR="${TOPDIR}/tmparm" This should not be specific for buildhistory, that is just an example, any class with an event like that should cause the same problem (uninative maybe?)
Fixed here: https://git.openembedded.org/bitbake/commit/?id=5f7fdf7b2d8c59805c8ef4dae84f536baa5e172b