diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-09-18 18:45:07 +0100 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2021-09-24 12:38:18 -1000 |
commit | 34301f8a38078c2329e460051a1193c0314bcfd2 (patch) | |
tree | a5272f85d6bb9b47c61c9dc95f52e147ffdbc20c | |
parent | 97541440e982848ef8bdbced22decdc24eda855b (diff) | |
download | bitbake-34301f8a38078c2329e460051a1193c0314bcfd2.tar.gz |
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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit f9cddaeef35b2ea0dadf717101ed896f6b857abd)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r-- | lib/bb/cookerdata.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/bb/cookerdata.py b/lib/bb/cookerdata.py index 26b9b0b41..32a8798f1 100644 --- a/lib/bb/cookerdata.py +++ b/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 |