kconfig check: add --keep-going argument (MR 2384)

Abort the "pmbootstrap kconfig check" on the first error, unless the
--keep-going argument was passed. This makes it easier to go through the
failed kernels one by one until they are all fixed.
This commit is contained in:
Oliver Smith 2024-07-28 15:51:59 +02:00
parent 816ae5ac6c
commit f1afdeaaa1
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
4 changed files with 13 additions and 2 deletions

View file

@ -14,11 +14,13 @@ class KConfigCheck(commands.Command):
details: bool
file: str
packages: list[str]
keep_going: bool
def __init__(self, details, file, packages):
def __init__(self, details, file, packages, keep_going):
self.details = details
self.file = file
self.packages = packages
self.keep_going = keep_going
def run(self):
# Build the components list from cli arguments (--waydroid etc.)
@ -51,6 +53,8 @@ class KConfigCheck(commands.Command):
continue
if not pmb.parse.kconfig.check(package, components_list, details=self.details):
error = True
if not self.keep_going:
break
# At least one failure
if error: