diff options
| author | Tom Rini <trini@konsulko.com> | 2026-07-14 15:42:08 -0600 |
|---|---|---|
| committer | Tom Rini <trini@konsulko.com> | 2026-07-14 15:42:08 -0600 |
| commit | 8dbe57ba648648c4897717cebbc4505a8e0a8c23 (patch) | |
| tree | aa6ae5d68b9c21c4435b96bd4becbb391dc7fc36 | |
| parent | 21ee6442ed165114c42276348b02d40f5710a577 (diff) | |
| parent | ab106a8564811b0cdbcec4b2998145dc5b304783 (diff) | |
Julien Stephan <jstephan@baylibre.com> says:
When I first ran ./tools/qconfig.py, it immediately crashed with a
Python traceback because the configuration database had not yet been
generated.
This series adds a simple pre-check that detects this condition and
prints a clear error message instructing the user to generate the
database first using the -b option, instead of failing with an unhandled
exception.
While looking at the script, I also noticed that the help text still
references the obsolete moveconfig.rst document. This series updates
that reference as well.
Link: https://lore.kernel.org/r/20260702-qconfig-check-for-db-v1-0-f0b96bf8fa44@baylibre.com
| -rwxr-xr-x | tools/qconfig.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/qconfig.py b/tools/qconfig.py index 5b85f9d22c3..930eb0e203d 100755 --- a/tools/qconfig.py +++ b/tools/qconfig.py @@ -871,6 +871,10 @@ def read_database(): value: set of boards using that option """ + if not os.path.exists(CONFIG_DATABASE): + sys.exit(f"Error: database '{CONFIG_DATABASE}' not found. " + f"Did you forget to generate it first with the -b option?") + configs = {} # key is defconfig name, value is dict of (CONFIG_xxx, value) @@ -1510,7 +1514,7 @@ def parse_args(): cpu_count = 1 epilog = '''Move config options from headers to defconfig files. See -doc/develop/moveconfig.rst for documentation.''' +doc/develop/qconfig.rst for documentation.''' parser = ArgumentParser(epilog=epilog) # Add arguments here |
