pmb.parse._apkbuild: Set "array": False by default (!1866)

This avoids having to set all unused options to False.
This commit is contained in:
Minecrell 2020-01-27 22:33:06 +01:00 committed by Alexey Min
parent 5f5050f9a3
commit 0dad22a112
No known key found for this signature in database
GPG Key ID: 463F84201DACD7B9
2 changed files with 13 additions and 13 deletions

View File

@ -222,32 +222,32 @@ apkbuild_attributes = {
"makedepends": {"array": True},
"checkdepends": {"array": True},
"options": {"array": True},
"pkgname": {"array": False},
"pkgdesc": {"array": False},
"pkgrel": {"array": False},
"pkgver": {"array": False},
"pkgname": {},
"pkgdesc": {},
"pkgrel": {},
"pkgver": {},
"provides": {"array": True},
"subpackages": {"array": True},
"url": {"array": False},
"url": {},
# cross-compilers
"makedepends_build": {"array": True},
"makedepends_host": {"array": True},
# kernels
"_flavor": {"array": False},
"_device": {"array": False},
"_kernver": {"array": False},
"_flavor": {},
"_device": {},
"_kernver": {},
# mesa
"_llvmver": {"array": False},
"_llvmver": {},
# Overridden packages
"_pkgver": {"array": False},
"_pkgname": {"array": False},
"_pkgver": {},
"_pkgname": {},
# git commit
"_commit": {"array": False},
"_commit": {},
"source": {"array": True},
}

View File

@ -243,7 +243,7 @@ def apkbuild(args, path, check_pkgver=True, check_pkgname=True):
# Split attributes
for attribute, options in pmb.config.apkbuild_attributes.items():
if options["array"]:
if options.get("array", False):
# Split up arrays, delete empty strings inside the list
ret[attribute] = list(filter(None, ret[attribute].split(" ")))