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 10:43:31 +0000 |
commit | 4b02d1fa21480780fd775a517ab7cc7ab0f9e9ca (patch) | |
tree | 4be733405312889eb60c2e7dc30d8ee735b12001 /bitbake/lib/bb | |
parent | 3bf06027130ca15cecbdf7f804a4e5153c4ce781 (diff) | |
download | poky-4b02d1fa21480780fd775a517ab7cc7ab0f9e9ca.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: 4359b037de578095db2595f119dfb8e3340e1414)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-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 e6b8d880ae..1982e880ba 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]) |