diff options
author | Simon Glass <sjg@chromium.org> | 2024-07-17 16:57:00 +0100 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2024-07-26 08:01:06 -0600 |
commit | fd35fbe22261f4f64bd83097bb10e7db323f54b9 (patch) | |
tree | e5a7f1d480bbd1f122ac4e593710042ec9b5713c /tools | |
parent | c50b6f18f31d461d30183460d83e13eef49d993b (diff) | |
download | u-boot-fd35fbe22261f4f64bd83097bb10e7db323f54b9.tar.gz |
qconfig: Move converting config args to the top
Move this check to the top, so it happens always. There is no harm to
doing this earlier and it separates the setup from actual program logic.
Update the arg rather than adding a new variable, with the new variable
only created when moving or building, since it is used more heavily.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/qconfig.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/qconfig.py b/tools/qconfig.py index 832e524c25c..a33fb2aa22b 100755 --- a/tools/qconfig.py +++ b/tools/qconfig.py @@ -1531,6 +1531,9 @@ def main(): check_top_directory() + # prefix the option name with CONFIG_ if missing + args.configs = [prefix_config(cfg) for cfg in args.configs] + if args.test: sys.argv = [sys.argv[0]] fail, _ = doctest.testmod() @@ -1542,9 +1545,6 @@ def main(): do_scan_source(os.getcwd(), args.update) return 0 - # prefix the option name with CONFIG_ if missing - configs = [prefix_config(cfg) for cfg in args.configs] - if args.imply: imply_flags = 0 if args.imply_flags == 'all': @@ -1563,11 +1563,11 @@ def main(): sys.exit(1) imply_flags |= IMPLY_FLAGS[flag][0] - do_imply_config(configs, args.add_imply, imply_flags, args.skip_added) + do_imply_config(args.configs, args.add_imply, imply_flags, args.skip_added) return 0 if args.find: - do_find_config(configs) + do_find_config(args.configs) return 0 # We are either building the database or forcing a sync of defconfigs @@ -1588,6 +1588,7 @@ def main(): progress = move_config(toolchains, args, db_queue, col) db_queue.join() + configs = args.configs if args.commit: subprocess.call(['git', 'add', '-u']) if configs: |