diff --git a/pmb/helpers/frontend.py b/pmb/helpers/frontend.py index 24f0c351..c9b76ab6 100644 --- a/pmb/helpers/frontend.py +++ b/pmb/helpers/frontend.py @@ -377,6 +377,7 @@ def newapkbuild(args): def kconfig(args): if args.action_kconfig == "check": + details = args.kconfig_check_details # Build the components list from cli arguments (--waydroid etc.) components_list = [] for name in pmb.parse.kconfig.get_all_component_names(): @@ -386,7 +387,7 @@ def kconfig(args): # Handle passing a file directly if args.file: if pmb.parse.kconfig.check_file(args.package, components_list, - details=True): + details=details): logging.info("kconfig check succeeded!") return raise RuntimeError("kconfig check failed!") @@ -414,7 +415,7 @@ def kconfig(args): skipped += 1 continue if not pmb.parse.kconfig.check(args, package, components_list, - details=True): + details=details): error = True # At least one failure diff --git a/pmb/parse/arguments.py b/pmb/parse/arguments.py index 1bf79623..1d1069c5 100644 --- a/pmb/parse/arguments.py +++ b/pmb/parse/arguments.py @@ -464,6 +464,10 @@ def arguments_kconfig(subparser): check.add_argument("--arch", choices=arch_choices, dest="arch") check.add_argument("--file", action="store_true", help="check a file" " directly instead of a config in a package") + check.add_argument("--no-details", action="store_false", + dest="kconfig_check_details", + help="print one generic error per component instead of" + " listing each option that needs to be adjusted") for name in pmb.parse.kconfig.get_all_component_names(): check.add_argument(f"--{name}", action="store_true", dest=f"kconfig_check_{name}",