diff --git a/pmb/parse/apkbuild.py b/pmb/parse/apkbuild.py index dd99276c..a6c45e8f 100644 --- a/pmb/parse/apkbuild.py +++ b/pmb/parse/apkbuild.py @@ -128,7 +128,7 @@ def apkbuild(args, path): value = [] ret[attribute] = value - # Add missing entries + # Add missing keys for attribute, options in pmb.config.apkbuild_attributes.items(): if attribute not in ret: if options["array"]: @@ -136,6 +136,10 @@ def apkbuild(args, path): else: ret[attribute] = "" + # Properly format values + ret = replace_variables(ret) + ret = cut_off_function_names(ret) + # Sanity check: pkgname suffix = "/" + ret["pkgname"] + "/APKBUILD" if not os.path.realpath(path).endswith(suffix): @@ -145,7 +149,5 @@ def apkbuild(args, path): " the folder, that contains the APKBUILD!") # Fill cache - ret = replace_variables(ret) - ret = cut_off_function_names(ret) args.cache["apkbuild"][path] = ret return ret