aboutsummaryrefslogtreecommitdiffstats
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-18 18:47:09 +0100
commitf9cddaeef35b2ea0dadf717101ed896f6b857abd (patch)
treeb93a7407ad65d23ee31750222c485042d6fc8865
parentbc43fbb86361a21dc2d5deb910810c5a77fdabe8 (diff)
downloadbitbake-master.tar.gz
bitbake-master.tar.bz2
bitbake-master.zip
cookerdata: Show a readable error for invalid multiconfig nameHEADmaster1.52
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/cookerdata.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/bb/cookerdata.py b/lib/bb/cookerdata.py
index d6206b73..ba657c03 100644
--- a/lib/bb/cookerdata.py
+++ b/lib/bb/cookerdata.py
@@ -291,6 +291,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