mirror of
https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git
synced 2025-07-13 11:29:46 +03:00
parse.arguments: Allow providing multiple packages for kconfig_check
It can be quite useful to check the configs for a list of packages, so adjust the argument parsing code to support that. Reviewed-by: Oliver Smith <ollieparanoid@postmarketos.org> Tested-by: Oliver Smith <ollieparanoid@postmarketos.org> Reviewed-by: Clayton Craft <clayton@craftyguy.net> Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20231028085901.35205-1-luca@z3ntu.xyz%3E
This commit is contained in:
parent
5dcd8465ed
commit
41daa850d7
2 changed files with 3 additions and 5 deletions
|
@ -393,10 +393,8 @@ def kconfig(args):
|
||||||
raise RuntimeError("kconfig check failed!")
|
raise RuntimeError("kconfig check failed!")
|
||||||
|
|
||||||
# Default to all kernel packages
|
# Default to all kernel packages
|
||||||
packages = []
|
packages = args.package
|
||||||
if args.package:
|
if not args.package:
|
||||||
packages = [args.package]
|
|
||||||
else:
|
|
||||||
for aport in pmb.helpers.pmaports.get_list(args):
|
for aport in pmb.helpers.pmaports.get_list(args):
|
||||||
if aport.startswith("linux-"):
|
if aport.startswith("linux-"):
|
||||||
packages.append(aport.split("linux-")[1])
|
packages.append(aport.split("linux-")[1])
|
||||||
|
|
|
@ -476,7 +476,7 @@ def arguments_kconfig(subparser):
|
||||||
check.add_argument(f"--{name}", action="store_true",
|
check.add_argument(f"--{name}", action="store_true",
|
||||||
dest=f"kconfig_check_{name}",
|
dest=f"kconfig_check_{name}",
|
||||||
help=f"check options needed for {name} too")
|
help=f"check options needed for {name} too")
|
||||||
add_kernel_arg(check)
|
add_kernel_arg(check, nargs="*")
|
||||||
|
|
||||||
# "pmbootstrap kconfig edit"
|
# "pmbootstrap kconfig edit"
|
||||||
edit = sub.add_parser("edit", help="edit kernel aport config")
|
edit = sub.add_parser("edit", help="edit kernel aport config")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue