From 11c7d23575826a27d0bcef18a52ad9cdb6597c71 Mon Sep 17 00:00:00 2001 From: Newbyte <newbyte@postmarketos.org> Date: Sun, 20 Oct 2024 20:57:34 +0200 Subject: [PATCH] pmb.parse.arguments: Make -x and -n mutually exclusive in kconfig edit (MR 2346) It doesn't make sense to both request the nconfig UI and the xconfig UI at the same time. Make them mutually exclusive. --- pmb/parse/arguments.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pmb/parse/arguments.py b/pmb/parse/arguments.py index 0de55c816..7dfeb716b 100644 --- a/pmb/parse/arguments.py +++ b/pmb/parse/arguments.py @@ -688,13 +688,14 @@ def arguments_kconfig(subparser): # "pmbootstrap kconfig edit" edit = sub.add_parser("edit", help="edit kernel aport config") edit.add_argument("--arch", choices=arch_choices, dest="arch", type=lambda x: Arch.from_str(x)) - edit.add_argument( + edit_ui_chooser = edit.add_mutually_exclusive_group() + edit_ui_chooser.add_argument( "-x", dest="xconfig", action="store_true", help="use xconfig rather than menuconfig for kernel configuration", ) - edit.add_argument( + edit_ui_chooser.add_argument( "-n", dest="nconfig", action="store_true", -- GitLab