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-28 17:03:13 +0000 |
commit | c425c0a38fc4af0ed208328470fb082cab4d00c7 (patch) | |
tree | e8c10d7813c54dcfbcce724d38ccccf869dada71 /bitbake/lib | |
parent | cc73390a75d98b96eb861ae0624283c1ea6ef1bd (diff) | |
download | poky-c425c0a38fc4af0ed208328470fb082cab4d00c7.tar.gz |
bitbake: 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.
(Bitbake rev: 25b585b981cc7e4ed48b0f7c89a075486fa1eb2b)
Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/cooker.py | 51 |
1 files changed, 31 insertions, 20 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 16681ba244..8e32af30e4 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -620,27 +620,38 @@ class BBCooker: | |||
620 | runlist.append([mc, k, ktask, fn]) | 620 | runlist.append([mc, k, ktask, fn]) |
621 | bb.event.fire(bb.event.TreeDataPreparationProgress(current, len(fulltargetlist)), self.data) | 621 | bb.event.fire(bb.event.TreeDataPreparationProgress(current, len(fulltargetlist)), self.data) |
622 | 622 | ||
623 | mcdeps = taskdata[mc].get_mcdepends() | 623 | |
624 | # No need to do check providers if there are no mcdeps or not an mc build | 624 | # No need to do check providers if there are no mcdeps or not an mc build |
625 | if mcdeps and mc: | 625 | if mc: |
626 | # Make sure we can provide the multiconfig dependency | 626 | # Add unresolved first, so we can get multiconfig indirect dependencies on time |
627 | seen = set() | 627 | for mcavailable in self.multiconfigs: |
628 | new = True | 628 | # The first element is empty |
629 | while new: | 629 | if mcavailable: |
630 | new = False | 630 | taskdata[mcavailable].add_unresolved(localdata[mcavailable], self.recipecaches[mcavailable]) |
631 | for mc in self.multiconfigs: | 631 | |
632 | for k in mcdeps: | 632 | |
633 | if k in seen: | 633 | mcdeps = taskdata[mc].get_mcdepends() |
634 | continue | 634 | |
635 | l = k.split(':') | 635 | if mcdeps: |
636 | depmc = l[2] | 636 | # Make sure we can provide the multiconfig dependency |
637 | if depmc not in self.multiconfigs: | 637 | seen = set() |
638 | bb.fatal("Multiconfig dependency %s depends on nonexistent mc configuration %s" % (k,depmc)) | 638 | new = True |
639 | else: | 639 | while new: |
640 | logger.debug(1, "Adding providers for multiconfig dependency %s" % l[3]) | 640 | new = False |
641 | taskdata[depmc].add_provider(localdata[depmc], self.recipecaches[depmc], l[3]) | 641 | for mc in self.multiconfigs: |
642 | seen.add(k) | 642 | for k in mcdeps: |
643 | new = True | 643 | if k in seen: |
644 | continue | ||
645 | l = k.split(':') | ||
646 | depmc = l[2] | ||
647 | if depmc not in self.multiconfigs: | ||
648 | bb.fatal("Multiconfig dependency %s depends on nonexistent mc configuration %s" % (k,depmc)) | ||
649 | else: | ||
650 | logger.debug(1, "Adding providers for multiconfig dependency %s" % l[3]) | ||
651 | taskdata[depmc].add_provider(localdata[depmc], self.recipecaches[depmc], l[3]) | ||
652 | seen.add(k) | ||
653 | new = True | ||
654 | |||
644 | for mc in self.multiconfigs: | 655 | for mc in self.multiconfigs: |
645 | taskdata[mc].add_unresolved(localdata[mc], self.recipecaches[mc]) | 656 | taskdata[mc].add_unresolved(localdata[mc], self.recipecaches[mc]) |
646 | 657 | ||