summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2026-07-14 15:42:08 -0600
committerTom Rini <trini@konsulko.com>2026-07-14 15:42:08 -0600
commit8dbe57ba648648c4897717cebbc4505a8e0a8c23 (patch)
treeaa6ae5d68b9c21c4435b96bd4becbb391dc7fc36
parent21ee6442ed165114c42276348b02d40f5710a577 (diff)
parentab106a8564811b0cdbcec4b2998145dc5b304783 (diff)
Merge patch series "tools: qconfig: print a proper error when database is missing"HEADmaster
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-xtools/qconfig.py6
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