diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-02-23 10:28:57 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-02-25 22:33:05 +0000 |
commit | 7c76c5d78b850a9c1adccf8b11ed0164da608f1c (patch) | |
tree | e4b24a51892c7dbe64a6075067784848119bd5e4 /bitbake/lib/bb/cooker.py | |
parent | 50b98006310d9b3238c0516d1e795d54ff408797 (diff) | |
download | poky-7c76c5d78b850a9c1adccf8b11ed0164da608f1c.tar.gz |
bitbake: cooker: Tweak multiconfig dependency resolution
There were a couple of problems with the multiconfig dependency resolution:
- the "if mc" condition triggering this code wasn't correct, it needs
to be "if more than one multiconfig" configured
- after adding providers we need to call add_unresolved again
and rebuild mcdeps within the "while new" loop
By fixing these issues we allow various other combinations of multiconfig
builds to work which previously didn't.
[YOCTO #13090]
[YOCTO #13130]
(Bitbake rev: b59cb2bc63940b9ebd8288de7ca4b1d9e96e026c)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r-- | bitbake/lib/bb/cooker.py | 53 |
1 files changed, 24 insertions, 29 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index db52964c3a..adc41014e6 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -641,35 +641,30 @@ class BBCooker: | |||
641 | 641 | ||
642 | 642 | ||
643 | # No need to do check providers if there are no mcdeps or not an mc build | 643 | # No need to do check providers if there are no mcdeps or not an mc build |
644 | if mc: | 644 | if len(self.multiconfigs) > 1: |
645 | # Add unresolved first, so we can get multiconfig indirect dependencies on time | 645 | seen = set() |
646 | for mcavailable in self.multiconfigs: | 646 | new = True |
647 | # The first element is empty | 647 | # Make sure we can provide the multiconfig dependency |
648 | if mcavailable: | 648 | while new: |
649 | taskdata[mcavailable].add_unresolved(localdata[mcavailable], self.recipecaches[mcavailable]) | 649 | mcdeps = set() |
650 | 650 | # Add unresolved first, so we can get multiconfig indirect dependencies on time | |
651 | 651 | for mc in self.multiconfigs: | |
652 | mcdeps = taskdata[mc].get_mcdepends() | 652 | taskdata[mc].add_unresolved(localdata[mc], self.recipecaches[mc]) |
653 | 653 | mcdeps |= set(taskdata[mc].get_mcdepends()) | |
654 | if mcdeps: | 654 | new = False |
655 | # Make sure we can provide the multiconfig dependency | 655 | for mc in self.multiconfigs: |
656 | seen = set() | 656 | for k in mcdeps: |
657 | new = True | 657 | if k in seen: |
658 | while new: | 658 | continue |
659 | new = False | 659 | l = k.split(':') |
660 | for mc in self.multiconfigs: | 660 | depmc = l[2] |
661 | for k in mcdeps: | 661 | if depmc not in self.multiconfigs: |
662 | if k in seen: | 662 | bb.fatal("Multiconfig dependency %s depends on nonexistent mc configuration %s" % (k,depmc)) |
663 | continue | 663 | else: |
664 | l = k.split(':') | 664 | logger.debug(1, "Adding providers for multiconfig dependency %s" % l[3]) |
665 | depmc = l[2] | 665 | taskdata[depmc].add_provider(localdata[depmc], self.recipecaches[depmc], l[3]) |
666 | if depmc not in self.multiconfigs: | 666 | seen.add(k) |
667 | bb.fatal("Multiconfig dependency %s depends on nonexistent mc configuration %s" % (k,depmc)) | 667 | new = True |
668 | else: | ||
669 | logger.debug(1, "Adding providers for multiconfig dependency %s" % l[3]) | ||
670 | taskdata[depmc].add_provider(localdata[depmc], self.recipecaches[depmc], l[3]) | ||
671 | seen.add(k) | ||
672 | new = True | ||
673 | 668 | ||
674 | for mc in self.multiconfigs: | 669 | for mc in self.multiconfigs: |
675 | taskdata[mc].add_unresolved(localdata[mc], self.recipecaches[mc]) | 670 | taskdata[mc].add_unresolved(localdata[mc], self.recipecaches[mc]) |