mirror of
https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git
synced 2025-07-13 11:29:46 +03:00
pmb: flasher: frontend: don't fail if kernel config cannot be found (MR 2184)
When using a kernel from Alpine the kernel configuration cannot be found in pmaports. We cannot check the kernel config for missing options in that case, but that's no reason to break the flasher entirely.
This commit is contained in:
parent
cc90bc81f0
commit
f1cbcb7b3b
3 changed files with 11 additions and 3 deletions
|
@ -167,11 +167,13 @@ def check(args, pkgname,
|
|||
force_zram_check=False,
|
||||
force_netboot_check=False,
|
||||
force_uefi_check=False,
|
||||
details=False):
|
||||
details=False,
|
||||
must_exist=True):
|
||||
"""
|
||||
Check for necessary kernel config options in a package.
|
||||
|
||||
:returns: True when the check was successful, False otherwise
|
||||
None if the aport cannot be found (only if must_exist=False)
|
||||
"""
|
||||
# Pkgname: allow omitting "linux-" prefix
|
||||
if pkgname.startswith("linux-"):
|
||||
|
@ -181,7 +183,9 @@ def check(args, pkgname,
|
|||
|
||||
# Read all kernel configs in the aport
|
||||
ret = True
|
||||
aport = pmb.helpers.pmaports.find(args, "linux-" + flavor)
|
||||
aport = pmb.helpers.pmaports.find(args, "linux-" + flavor, must_exist=must_exist)
|
||||
if aport is None:
|
||||
return None
|
||||
apkbuild = pmb.parse.apkbuild(f"{aport}/APKBUILD")
|
||||
pkgver = apkbuild["pkgver"]
|
||||
check_anbox = force_anbox_check or (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue