diff options
author | Alejandro Enedino Hernandez Samaniego <alejandro.enedino.hernandez-samaniego@xilinx.com> | 2018-12-28 12:47:46 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-01-03 12:36:50 +0000 |
commit | 8a6bc7584ad61b4de98af92a86066602006262f9 (patch) | |
tree | f1e0bd8e9b65969ab96f1cbcc77469ef5f8a2fba | |
parent | 353f0f3c77c3cdd75c1be2a565234a5e53dba3ef (diff) | |
download | bitbake-8a6bc7584ad61b4de98af92a86066602006262f9.tar.gz |
cooker: fix indirect multiconfig dependencies
When an indirect multiconfig dependency exists, such as:
A depends on B, B has a multiconfig dependency to C,and our build
target is A, the multiconfig dependency to C is not processed on
time, hence no providers are added for it, causing an exception in
the runqueue because the dependency does exist in it.
Call add_unresolved() for all available multiconfigs before processing
providers for multiconfig dependencies, detecting mcdepends on time so
providers for them can be added correctly.
Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/bb/cooker.py | 51 |
1 files changed, 31 insertions, 20 deletions
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py index 18979362b..db52964c3 100644 --- a/lib/bb/cooker.py +++ b/lib/bb/cooker.py @@ -639,27 +639,38 @@ class BBCooker: runlist.append([mc, k, ktask, fn]) bb.event.fire(bb.event.TreeDataPreparationProgress(current, len(fulltargetlist)), self.data) - mcdeps = taskdata[mc].get_mcdepends() + # No need to do check providers if there are no mcdeps or not an mc build - if mcdeps and mc: - # Make sure we can provide the multiconfig dependency - seen = set() - new = True - while new: - new = False - for mc in self.multiconfigs: - for k in mcdeps: - if k in seen: - continue - l = k.split(':') - depmc = l[2] - if depmc not in self.multiconfigs: - bb.fatal("Multiconfig dependency %s depends on nonexistent mc configuration %s" % (k,depmc)) - else: - logger.debug(1, "Adding providers for multiconfig dependency %s" % l[3]) - taskdata[depmc].add_provider(localdata[depmc], self.recipecaches[depmc], l[3]) - seen.add(k) - new = True + if mc: + # Add unresolved first, so we can get multiconfig indirect dependencies on time + for mcavailable in self.multiconfigs: + # The first element is empty + if mcavailable: + taskdata[mcavailable].add_unresolved(localdata[mcavailable], self.recipecaches[mcavailable]) + + + mcdeps = taskdata[mc].get_mcdepends() + + if mcdeps: + # Make sure we can provide the multiconfig dependency + seen = set() + new = True + while new: + new = False + for mc in self.multiconfigs: + for k in mcdeps: + if k in seen: + continue + l = k.split(':') + depmc = l[2] + if depmc not in self.multiconfigs: + bb.fatal("Multiconfig dependency %s depends on nonexistent mc configuration %s" % (k,depmc)) + else: + logger.debug(1, "Adding providers for multiconfig dependency %s" % l[3]) + taskdata[depmc].add_provider(localdata[depmc], self.recipecaches[depmc], l[3]) + seen.add(k) + new = True + for mc in self.multiconfigs: taskdata[mc].add_unresolved(localdata[mc], self.recipecaches[mc]) |