summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-18 18:45:07 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-24 10:13:32 +0100
commitd0facfa5d774c3c85bd1eddae7cd935f1b34d64e (patch)
tree7a1ad3cc1bc92f48c9fbe54e47787e1ce9ea220d /bitbake
parent623ac03b1bf4b66b7f0cc5c03e24c7ee10bd8147 (diff)
downloadpoky-d0facfa5d774c3c85bd1eddae7cd935f1b34d64e.tar.gz
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: fb2c154c8a96fd30d46e34c7ae715d1b964ced35) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit f9cddaeef35b2ea0dadf717101ed896f6b857abd) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/cookerdata.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/bitbake/lib/bb/cookerdata.py b/bitbake/lib/bb/cookerdata.py
index d6206b7319..ba657c03b6 100644
--- a/bitbake/lib/bb/cookerdata.py
+++ b/bitbake/lib/bb/cookerdata.py
@@ -291,6 +291,8 @@ class CookerDataBuilder(object):
291 291
292 multiconfig = (self.data.getVar("BBMULTICONFIG") or "").split() 292 multiconfig = (self.data.getVar("BBMULTICONFIG") or "").split()
293 for config in multiconfig: 293 for config in multiconfig:
294 if config[0].isdigit():
295 bb.fatal("Multiconfig name '%s' is invalid as multiconfigs cannot start with a digit" % config)
294 mcdata = self.parseConfigurationFiles(self.prefiles, self.postfiles, config) 296 mcdata = self.parseConfigurationFiles(self.prefiles, self.postfiles, config)
295 bb.event.fire(bb.event.ConfigParsed(), mcdata) 297 bb.event.fire(bb.event.ConfigParsed(), mcdata)
296 self.mcdata[config] = mcdata 298 self.mcdata[config] = mcdata