diff options
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]) |