Bug 13124

Summary: multiconfig builds break when preparing the task hash (runqueue)
Product: [Build System, Metadata & Runtime] BitBake Reporter: Alejandro Hernandez <alejandr>
Component: bitbakeAssignee: Joshua Watt <JPEWhacker>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: alejandr, poky.bs.watcher, poky.watcher
Version: unspecified   
Target Milestone: 2.7 M2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Alejandro Hernandez 2019-01-07 07:11:28 UTC
After the new implementation of task hashes on https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=57e3c55f6dd17f8019335818c6f34e67f8110295

multiconfig builds now break due to a KeyError.


I suspect this is because this is because it is not taking into account that the Key could contain "mc:..." if it is a multiconfig build. 

Usually a multiconfig build is used to build several configurations with one single bitbake command, we can set it up following the documentation (https://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#dev-building-images-for-multiple-targets-using-multiple-configurations), but in this case even a multiconfig build that builds one single configuration would suffice to reproduce the issue (because it will still have the "mc"):

on local.conf:
BBMULTICONFIG = "x86"

on conf/multiconfig/x86.conf:
MACHINE="qemux86"
TMPDIR="${TOPDIR}/multix86"

$ bitbake multiconfig:x86:core-image-minimal

ERROR: Running idle function
 File "poky/bitbake/lib/bb/runqueue.py", line 1170, in RunQueueData.prepare_task_hash(tid='multiconfig:x86:poky/meta/recipes-support/attr/acl_2.2.52.bb:do_fetch'):
             self.runtaskentries[tid].hash = bb.parse.siggen.get_taskhash(taskfn, taskname, procdep, self.dataCaches[mc])
    >        self.runtaskentries[tid].unihash = bb.parse.siggen.get_unihash(fn + "." + taskname)

  File "poky/bitbake/lib/bb/siggen.py", line 45, in SignatureGeneratorOEBasicHash.get_unihash(task='poky/meta/recipes-support/attr/acl_2.2.52.bb.do_fetch'):
         def get_unihash(self, task):
    >        return self.taskhash[task]

KeyError: 'poky/meta/recipes-support/attr/acl_2.2.52.bb.do_fetch'