pmb.parse._apkbuild: Set "array": False by default (!1866)
This avoids having to set all unused options to False.
This commit is contained in:
parent
5f5050f9a3
commit
0dad22a112
|
@ -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},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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(" ")))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue