From 75c8a5f5666481854232778f046cb30473ea6dc9 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sat, 18 Sep 2021 18:45:07 +0100 Subject: bitbake: cookerdata: Show a readable error for invalid multiconfig name If a multiconfig starts with a digit, users would see pages of errors as we use the multiconfig as a python function name prefix and python functions cannot start with a digit. We could avoid doing that but it is easier just to ask users to name multiconfigs not starting with digits. This tweak ensures the user sees an easier to understand error. (Bitbake rev: 34301f8a38078c2329e460051a1193c0314bcfd2) Signed-off-by: Richard Purdie (cherry picked from commit f9cddaeef35b2ea0dadf717101ed896f6b857abd) Signed-off-by: Steve Sakoman Signed-off-by: Richard Purdie --- bitbake/lib/bb/cookerdata.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'bitbake') diff --git a/bitbake/lib/bb/cookerdata.py b/bitbake/lib/bb/cookerdata.py index 26b9b0b41b..32a8798f1e 100644 --- a/bitbake/lib/bb/cookerdata.py +++ b/bitbake/lib/bb/cookerdata.py @@ -297,6 +297,8 @@ class CookerDataBuilder(object): multiconfig = (self.data.getVar("BBMULTICONFIG") or "").split() for config in multiconfig: + if config[0].isdigit(): + bb.fatal("Multiconfig name '%s' is invalid as multiconfigs cannot start with a digit" % config) mcdata = self.parseConfigurationFiles(self.prefiles, self.postfiles, config) bb.event.fire(bb.event.ConfigParsed(), mcdata) self.mcdata[config] = mcdata -- cgit v1.2.3-54-g00ecf