summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
authorAlejandro Enedino Hernandez Samaniego <alejandro.enedino.hernandez-samaniego@xilinx.com>2018-12-28 12:47:46 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-01-03 12:36:55 +0000
commit99f505422bc06ba26ac39baa6138669fabfb4fea (patch)
treef2a9bc85195b7cab6f14319a38fd9d50a3490205 /bitbake/lib/bb
parent001f23a868e5e601195579213c6c64c3f922d099 (diff)
downloadpoky-99f505422bc06ba26ac39baa6138669fabfb4fea.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: 8a6bc7584ad61b4de98af92a86066602006262f9) Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/cooker.py51
1 files changed, 31 insertions, 20 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 18979362b6..db52964c3a 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -639,27 +639,38 @@ class BBCooker:
639 runlist.append([mc, k, ktask, fn]) 639 runlist.append([mc, k, ktask, fn])
640 bb.event.fire(bb.event.TreeDataPreparationProgress(current, len(fulltargetlist)), self.data) 640 bb.event.fire(bb.event.TreeDataPreparationProgress(current, len(fulltargetlist)), self.data)
641 641
642 mcdeps = taskdata[mc].get_mcdepends() 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 mcdeps and mc: 644 if mc:
645 # Make sure we can provide the multiconfig dependency 645 # Add unresolved first, so we can get multiconfig indirect dependencies on time
646 seen = set() 646 for mcavailable in self.multiconfigs:
647 new = True 647 # The first element is empty
648 while new: 648 if mcavailable:
649 new = False 649 taskdata[mcavailable].add_unresolved(localdata[mcavailable], self.recipecaches[mcavailable])
650 for mc in self.multiconfigs: 650
651 for k in mcdeps: 651
652 if k in seen: 652 mcdeps = taskdata[mc].get_mcdepends()
653 continue 653
654 l = k.split(':') 654 if mcdeps:
655 depmc = l[2] 655 # Make sure we can provide the multiconfig dependency
656 if depmc not in self.multiconfigs: 656 seen = set()
657 bb.fatal("Multiconfig dependency %s depends on nonexistent mc configuration %s" % (k,depmc)) 657 new = True
658 else: 658 while new:
659 logger.debug(1, "Adding providers for multiconfig dependency %s" % l[3]) 659 new = False
660 taskdata[depmc].add_provider(localdata[depmc], self.recipecaches[depmc], l[3]) 660 for mc in self.multiconfigs:
661 seen.add(k) 661 for k in mcdeps:
662 new = True 662 if k in seen:
663 continue
664 l = k.split(':')
665 depmc = l[2]
666 if depmc not in self.multiconfigs:
667 bb.fatal("Multiconfig dependency %s depends on nonexistent mc configuration %s" % (k,depmc))
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
663 for mc in self.multiconfigs: 674 for mc in self.multiconfigs:
664 taskdata[mc].add_unresolved(localdata[mc], self.recipecaches[mc]) 675 taskdata[mc].add_unresolved(localdata[mc], self.recipecaches[mc])
665 676