pmb.parse._apkbuild: parse provider_priority as int (MR 2132)

This commit is contained in:
Minecrell 2021-11-01 09:39:45 +01:00 committed by Oliver Smith
parent 19b232969d
commit 47645f41b1
No known key found for this signature in database
GPG Key ID: 5AE7F5513E0885CB
2 changed files with 6 additions and 0 deletions

View File

@ -559,6 +559,7 @@ apkbuild_package_attributes = {
"pkgdesc": {},
"depends": {"array": True},
"provides": {"array": True},
"provider_priority": {"int": True},
"install": {"array": True},
# UI meta-packages can specify apps in "_pmb_recommends" to be explicitly

View File

@ -209,6 +209,11 @@ def _parse_attributes(path, lines, apkbuild_attributes, ret):
if options.get("array", False):
# Split up arrays, delete empty strings inside the list
ret[attribute] = list(filter(None, ret[attribute].split(" ")))
if options.get("int", False):
if ret[attribute]:
ret[attribute] = int(ret[attribute])
else:
ret[attribute] = 0
def _parse_subpackage(path, lines, apkbuild, subpackages, subpkg):