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}, "makedepends": {"array": True},
"checkdepends": {"array": True}, "checkdepends": {"array": True},
"options": {"array": True}, "options": {"array": True},
"pkgname": {"array": False}, "pkgname": {},
"pkgdesc": {"array": False}, "pkgdesc": {},
"pkgrel": {"array": False}, "pkgrel": {},
"pkgver": {"array": False}, "pkgver": {},
"provides": {"array": True}, "provides": {"array": True},
"subpackages": {"array": True}, "subpackages": {"array": True},
"url": {"array": False}, "url": {},
# cross-compilers # cross-compilers
"makedepends_build": {"array": True}, "makedepends_build": {"array": True},
"makedepends_host": {"array": True}, "makedepends_host": {"array": True},
# kernels # kernels
"_flavor": {"array": False}, "_flavor": {},
"_device": {"array": False}, "_device": {},
"_kernver": {"array": False}, "_kernver": {},
# mesa # mesa
"_llvmver": {"array": False}, "_llvmver": {},
# Overridden packages # Overridden packages
"_pkgver": {"array": False}, "_pkgver": {},
"_pkgname": {"array": False}, "_pkgname": {},
# git commit # git commit
"_commit": {"array": False}, "_commit": {},
"source": {"array": True}, "source": {"array": True},
} }

View File

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