pmb.helpers.frontend: Convert kconfig check --file argument

Stop using --file as a boolean argument and just use the value behind
the argument as file to check. This also unbreaks this functionality
after the recent change now that args.package is a list since you can
pass multiple kernel packages as arguments.

Fixes: 41daa850 ("parse.arguments: Allow providing multiple packages for kconfig_check")
Closes: https://gitlab.com/postmarketOS/pmbootstrap/-/issues/2282
Reviewed-by: Oliver Smith <ollieparanoid@postmarketos.org>
Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20231203094559.413672-1-luca@z3ntu.xyz%3E
This commit is contained in:
Luca Weiss 2023-12-03 10:45:59 +01:00 committed by Oliver Smith
parent d7f9769ee0
commit 1f1bb8e7e0
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
2 changed files with 3 additions and 3 deletions

View file

@ -386,7 +386,7 @@ def kconfig(args):
# Handle passing a file directly # Handle passing a file directly
if args.file: if args.file:
if pmb.parse.kconfig.check_file(args.package, components_list, if pmb.parse.kconfig.check_file(args.file, components_list,
details=details): details=details):
logging.info("kconfig check succeeded!") logging.info("kconfig check succeeded!")
return return

View file

@ -468,8 +468,8 @@ def arguments_kconfig(subparser):
" kernels, even the ones that would be ignored by" " kernels, even the ones that would be ignored by"
" default") " default")
check.add_argument("--arch", choices=arch_choices, dest="arch") check.add_argument("--arch", choices=arch_choices, dest="arch")
check.add_argument("--file", action="store_true", help="check a file" check.add_argument("--file", help="check a file directly instead of a"
" directly instead of a config in a package") " config in a package")
check.add_argument("--no-details", action="store_false", check.add_argument("--no-details", action="store_false",
dest="kconfig_check_details", dest="kconfig_check_details",
help="print one generic error per component instead of" help="print one generic error per component instead of"