mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
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>
This commit is contained in:
@@ -626,6 +626,7 @@ class BBCooker:
|
|||||||
current = 0
|
current = 0
|
||||||
runlist = []
|
runlist = []
|
||||||
for k in fulltargetlist:
|
for k in fulltargetlist:
|
||||||
|
origk = k
|
||||||
mc = ""
|
mc = ""
|
||||||
if k.startswith("mc:"):
|
if k.startswith("mc:"):
|
||||||
mc = k.split(":")[1]
|
mc = k.split(":")[1]
|
||||||
@@ -635,6 +636,10 @@ class BBCooker:
|
|||||||
k2 = k.split(":do_")
|
k2 = k.split(":do_")
|
||||||
k = k2[0]
|
k = k2[0]
|
||||||
ktask = k2[1]
|
ktask = k2[1]
|
||||||
|
|
||||||
|
if mc not in self.multiconfigs:
|
||||||
|
bb.fatal("Multiconfig dependency %s depends on nonexistent multiconfig configuration named %s" % (origk, mc))
|
||||||
|
|
||||||
taskdata[mc].add_provider(localdata[mc], self.recipecaches[mc], k)
|
taskdata[mc].add_provider(localdata[mc], self.recipecaches[mc], k)
|
||||||
current += 1
|
current += 1
|
||||||
if not ktask.startswith("do_"):
|
if not ktask.startswith("do_"):
|
||||||
@@ -670,7 +675,7 @@ class BBCooker:
|
|||||||
l = k.split(':')
|
l = k.split(':')
|
||||||
depmc = l[2]
|
depmc = l[2]
|
||||||
if depmc not in self.multiconfigs:
|
if depmc not in self.multiconfigs:
|
||||||
bb.fatal("Multiconfig dependency %s depends on nonexistent mc configuration %s" % (k,depmc))
|
bb.fatal("Multiconfig dependency %s depends on nonexistent multiconfig configuration named configuration %s" % (k,depmc))
|
||||||
else:
|
else:
|
||||||
logger.debug(1, "Adding providers for multiconfig dependency %s" % l[3])
|
logger.debug(1, "Adding providers for multiconfig dependency %s" % l[3])
|
||||||
taskdata[depmc].add_provider(localdata[depmc], self.recipecaches[depmc], l[3])
|
taskdata[depmc].add_provider(localdata[depmc], self.recipecaches[depmc], l[3])
|
||||||
|
|||||||
Reference in New Issue
Block a user