Fix #349: Verify pkgname against folder name after replacing vars
This fixes a regression introduced in 7fe2bc18c3
.
Sorry for the inconvenience!
This commit is contained in:
parent
7fe2bc18c3
commit
ae64894278
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue