kconfig check: allow skip with !pmb:kconfigcheck (!1753)
Ignore APKBUILDs that have "!pmb:kconfigcheck" in their options by default in "pmbootstrap kconfig check", but print a note that they have been skipped. Check all kernels with "pmbootstrap kconfig check -f". This is necessary, because the Librem 5 devboard kernel's config does not have CONFIG_DM_CRYPT enabled in their config, and we check for that. As the device is still under heavy development, we will make our lives easier by just using the upstream kernel config without any changes and ignoring it in our check by default.
This commit is contained in:
parent
0dc2709768
commit
2634bbea95
|
@ -252,8 +252,15 @@ def kconfig(args):
|
|||
|
||||
# Iterate over all kernels
|
||||
error = False
|
||||
skipped = 0
|
||||
packages.sort()
|
||||
for package in packages:
|
||||
if not args.force:
|
||||
aport = pmb.helpers.pmaports.find(args, "linux-" + package)
|
||||
apkbuild = pmb.parse.apkbuild(args, aport + "/APKBUILD")
|
||||
if "!pmb:kconfigcheck" in apkbuild["options"]:
|
||||
skipped += 1
|
||||
continue
|
||||
if not pmb.parse.kconfig.check(args, package, details=True):
|
||||
error = True
|
||||
|
||||
|
@ -261,6 +268,9 @@ def kconfig(args):
|
|||
if error:
|
||||
raise RuntimeError("kconfig check failed!")
|
||||
else:
|
||||
if skipped:
|
||||
logging.info("NOTE: " + str(skipped) + " kernel(s) was skipped"
|
||||
" (consider 'pmbootstrap kconfig check -f')")
|
||||
logging.info("kconfig check succeded!")
|
||||
elif args.action_kconfig == "edit":
|
||||
pmb.build.menuconfig(args, args.package)
|
||||
|
|
|
@ -223,6 +223,9 @@ def arguments_kconfig(subparser):
|
|||
|
||||
# "pmbootstrap kconfig check"
|
||||
check = sub.add_parser("check", help="check kernel aport config")
|
||||
check.add_argument("-f", "--force", action="store_true", help="check all"
|
||||
" kernels, even the ones that would be ignored by"
|
||||
" default")
|
||||
check.add_argument("--arch", choices=arch_choices, dest="arch")
|
||||
check_package = check.add_argument("package", default="", nargs='?')
|
||||
if argcomplete:
|
||||
|
|
Loading…
Reference in New Issue