summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-07-22 21:23:04 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-07-23 16:49:39 +0100
commitc28d643c7bb997eab04e31b47dbcaa0a1ed0296d (patch)
treee53b522eca4fdadaaf0512733d37ad5537ddf35c /bitbake/lib
parent94b1d77472ad335f26ca4ea6ec8c5b399368c06e (diff)
downloadpoky-c28d643c7bb997eab04e31b47dbcaa0a1ed0296d.tar.gz
bitbake: cooker: Improve multiconfig configuration error reporting
This avoids a traceback if an invalid multiconfig is referenced in the bitbake commandline and tweaks the message to make it more understanable. (Bitbake rev: f31d7d0ad57b0ecc2ae06ed4b547c98df2aaa1a5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/cooker.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 3a58a3a332..19ddc1d3ba 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -626,6 +626,7 @@ class BBCooker:
626 current = 0 626 current = 0
627 runlist = [] 627 runlist = []
628 for k in fulltargetlist: 628 for k in fulltargetlist:
629 origk = k
629 mc = "" 630 mc = ""
630 if k.startswith("mc:"): 631 if k.startswith("mc:"):
631 mc = k.split(":")[1] 632 mc = k.split(":")[1]
@@ -635,6 +636,10 @@ class BBCooker:
635 k2 = k.split(":do_") 636 k2 = k.split(":do_")
636 k = k2[0] 637 k = k2[0]
637 ktask = k2[1] 638 ktask = k2[1]
639
640 if mc not in self.multiconfigs:
641 bb.fatal("Multiconfig dependency %s depends on nonexistent multiconfig configuration named %s" % (origk, mc))
642
638 taskdata[mc].add_provider(localdata[mc], self.recipecaches[mc], k) 643 taskdata[mc].add_provider(localdata[mc], self.recipecaches[mc], k)
639 current += 1 644 current += 1
640 if not ktask.startswith("do_"): 645 if not ktask.startswith("do_"):
@@ -670,7 +675,7 @@ class BBCooker:
670 l = k.split(':') 675 l = k.split(':')
671 depmc = l[2] 676 depmc = l[2]
672 if depmc not in self.multiconfigs: 677 if depmc not in self.multiconfigs:
673 bb.fatal("Multiconfig dependency %s depends on nonexistent mc configuration %s" % (k,depmc)) 678 bb.fatal("Multiconfig dependency %s depends on nonexistent multiconfig configuration named configuration %s" % (k,depmc))
674 else: 679 else:
675 logger.debug(1, "Adding providers for multiconfig dependency %s" % l[3]) 680 logger.debug(1, "Adding providers for multiconfig dependency %s" % l[3])
676 taskdata[depmc].add_provider(localdata[depmc], self.recipecaches[depmc], l[3]) 681 taskdata[depmc].add_provider(localdata[depmc], self.recipecaches[depmc], l[3])