From: "Anuj Mittal" <anuj.mittal@intel.com>
To: bitbake-devel@lists.openembedded.org
Subject: [hardknott][PATCH 7/8] cookerdata: Show a readable error for invalid multiconfig name
Date: Tue, 21 Sep 2021 16:35:15 +0800 [thread overview]
Message-ID: <636bf8aa0c5a61bfafd25fba7335092a9925e2f9.1632212181.git.anuj.mittal@intel.com> (raw)
In-Reply-To: <cover.1632212181.git.anuj.mittal@intel.com>
From: Richard Purdie <richard.purdie@linuxfoundation.org>
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: Anuj Mittal <anuj.mittal@intel.com>
---
lib/bb/cookerdata.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/bb/cookerdata.py b/lib/bb/cookerdata.py
index d6206b731..ba657c03b 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
--
2.31.1
next prev parent reply other threads:[~2021-09-21 8:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-21 8:35 [hardknott][PATCH 0/8] Review request Anuj Mittal
2021-09-21 8:35 ` [hardknott][PATCH 1/8] cookerdata: Show error for no BBLAYERS in bblayers.conf Anuj Mittal
2021-09-21 8:35 ` [hardknott][PATCH 2/8] cookerdata: Improve missing core layer error message Anuj Mittal
2021-09-21 8:35 ` [hardknott][PATCH 3/8] data_smart: Improve error display for handled exceptions Anuj Mittal
2021-09-21 8:35 ` [hardknott][PATCH 4/8] runqueue: Clean up task stats handling Anuj Mittal
2021-09-21 8:35 ` [hardknott][PATCH 5/8] cooker/process: Fix typos in exiting message Anuj Mittal
2021-09-21 8:35 ` [hardknott][PATCH 6/8] bitbake-worker: Improve error handling Anuj Mittal
2021-09-21 8:35 ` Anuj Mittal [this message]
2021-09-21 8:35 ` [hardknott][PATCH 8/8] runqueue/knotty: Improve UI handling of setscene task counting Anuj Mittal
2021-09-21 17:22 ` [bitbake-devel] [hardknott][PATCH 0/8] Review request Martin Jansa
2021-09-21 17:30 ` Steve Sakoman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=636bf8aa0c5a61bfafd25fba7335092a9925e2f9.1632212181.git.anuj.mittal@intel.com \
--to=anuj.mittal@intel.com \
--cc=bitbake-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).