Fix menuconfig arch check (#1259)

We don't use 'arch="all"' in our kernels anymore (that does not make sense,
since each arch needs its own kernel config). This patch fixes the menuconfig
code to work with multiple values in the "arch" field.
This commit is contained in:
Attila Szöllősi 2018-02-25 18:44:01 +01:00 committed by Oliver Smith
parent cd8b190bc3
commit e4875e54fa
1 changed files with 3 additions and 2 deletions

View File

@ -33,13 +33,14 @@ def get_arch(args, apkbuild):
Get the architecture, that the user wants to run menuconfig on, depending on
the APKBUILD and on the --arch parameter.
:param apkbuild: looks like: {"pkgname": "linux-...", "arch": ["all"]}
:param apkbuild: looks like: {"pkgname": "linux-...",
"arch": ["x86_64", "armhf", "aarch64"]}
or: {"pkgname": "linux-...", "arch": ["armhf"]}
"""
pkgname = apkbuild["pkgname"]
# Multiple architectures (requires --arch)
if "all" in apkbuild["arch"]:
if len(apkbuild["arch"]) > 1:
if args.arch is None:
raise RuntimeError("Package '" + pkgname + "' supports multiple"
" architectures, please use '--arch' to specify"