kconfig check: support passing a file directly (!1802)

This allows for example for me to call the kconfig check function on the
.config file in my Linux tree: $ pmbootstrap kconfig check --file
.config and it reports me which kconfig options I need to enable.
This commit is contained in:
Luca Weiss 2019-07-20 18:49:05 +02:00 committed by Oliver Smith
parent 9dc326ecb8
commit 30384b9083
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
3 changed files with 97 additions and 43 deletions

View file

@ -247,6 +247,13 @@ def newapkbuild(args):
def kconfig(args):
if args.action_kconfig == "check":
# Handle passing a file directly
if args.file:
if pmb.parse.kconfig.check_file(args, args.package, details=True):
logging.info("kconfig check succeeded!")
return
raise RuntimeError("kconfig check failed!")
# Default to all kernel packages
packages = []
if args.package == "" or args.package is None: