Commit Graph

13 Commits

Author SHA1 Message Date
Simon Glass
c50b6f18f3 qconfig: Move checking directory to the top
Move this check to the top, so it happens always. The tool should be
run from the U-Boot source directory.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-26 08:01:06 -06:00
Simon Glass
035ecb44ec qconfig: Move getting the colour to where it is needed
Move this assignment down to just above where it is needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-26 08:01:06 -06:00
Simon Glass
382c662c82 qconfig: Move arg checking to the top of main()
Check for 'test' as one of the possible operations for this tool,
moving the check above the implementation.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-26 08:01:06 -06:00
Simon Glass
fd385b3b01 qconfig: Move arg checking a little higher
Check for scan_source as one of the possible operations for this tool,
moving the check above the scan_source implementation.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-26 08:01:06 -06:00
Simon Glass
a056c4272c qconfig: Move arg parsing into a separate function
Reduce the size of main() by putting this code into its own function.
For now the parser object needs to be returned too.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-26 08:01:06 -06:00
Simon Glass
495e58c920 qconfig: Rename the doc link
This was missed during the renaming of the tool. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: ea4d6dead3 ("moveconfig: Rename the tool to qconfig")
2024-07-26 08:01:06 -06:00
Simon Glass
0e03fb1848 qconfig: Correct format string in do_imply_config()
One of the strings was converted incorrectly. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 1bd43060b3 ("moveconfig: Use f strings where possible")
2024-07-26 08:01:06 -06:00
Simon Glass
f876e96f4c qconfig: Tidy up some pylint warnings
Reduce the number of warnings in this file a little bit.

Add my own name to the copyright message.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-26 08:01:06 -06:00
Simon Glass
0a0c124008 qconfig: Make KconfigScanner a function
This doesn't have any methods so is not good as a class. Make it a
function instead, to keep pylint happy.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-26 08:01:06 -06:00
Simon Glass
deedf65306 qconfig: Drop the try_expand() function
This is not used anymore, so drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-26 08:01:06 -06:00
Simon Glass
61d555d8a7 qconfig: Fix pylint error in read_database()
Fix this error by initing the variable before the loop:

tools/qconfig.py:880:22: E0606: Possibly using variable 'defconfig'
   before assignment (possibly-used-before-assignment)

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-26 08:01:05 -06:00
Simon Glass
519637929b qconfig: Rename the database file
Use qconfig.db as the new name, to reflect the tool's purpose.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-10-04 09:25:22 -06:00
Simon Glass
ea4d6dead3 moveconfig: Rename the tool to qconfig
This does not move configs anymore, but queries them, based on a database
it can build. Rename the tool to better reflect its purpose.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-10-04 09:25:21 -06:00