Bug 13090

Summary: re-enable indirect multiconfig dependencies
Product: [Build System, Metadata & Runtime] BitBake Reporter: Alejandro Hernandez <alejandr>
Component: bitbakeAssignee: Alejandro Hernandez <alejandr>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: High CC: poky.bs.watcher, poky.watcher, richard.purdie
Version: unspecified   
Target Milestone: 2.7 M3   
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 2018-12-17 18:20:48 UTC
While fixing bug https://bugzilla.yoctoproject.org/show_bug.cgi?id=12985 indirect multiconfig dependencies stopped working.

If a dependency such as the following exists in the metadata:

python_2.7.bb:
do_compile[mcdepends] += "multiconfig:x86:arm:python:do_configure"

do_compile from python from the x86 multiconfig should depend on do_configure from python from the arm multiconfig.

This works just fine it we call:

$ bitbake multiconfig:x86:python

And that's because python is the target were building.


But, if we assume for example that core-image-minimal depends on python, and we use core-image-minimal as our target, it wont work, and we'll get an uncaught exception.

$ bitbake multiconfig:x86:core-image-minimal

Traceback (most recent call last):
  File "bitbake/lib/bb/runqueue.py", line 1474, in RunQueue.execute_runqueue():
             try:
    >            return self._execute_runqueue()
             except bb.runqueue.TaskFailure:
  File "bitbake/lib/bb/runqueue.py", line 1394, in RunQueue._execute_runqueue():
                                                                 [43, 967, 4, 3, 1, 5, 3, 7, 13, 1, 2, 1, 1, 246, 35, 1, 38, 1, 35, 2, 338, 204, 142, 3, 3, 37, 244])
    >            if self.rqdata.prepare() == 0:
                     self.state = runQueueComplete
  File "bitbake/lib/bb/runqueue.py", line 636, in RunQueueData.prepare():
                     if 'mcdepends' in task_deps and taskname in task_deps['mcdepends']:
    >                    add_mc_dependencies(mc, tid)
     
  File "bitbake/lib/bb/runqueue.py", line 614, in add_mc_dependencies(mc='x86', tid='multiconfig:x86:meta/recipes-devtools/pytho
n/python_2.7.15.bb:do_configure'):
                     if mc == frommc:
    >                    fn = taskData[mcdep].build_targets[pn][0]
                         newdep = '%s:%s' % (fn,deptask)
KeyError: 'python'


I believe this is happening because the multiconfig dependencies aren't parsed in time for the build system to be aware they exist.