forked from Mirror/pmbootstrap
pmb.aportgen.core.rewrite: no lines with empty val (MR 1942)
Avoid apkbuild-lint errors like: [AL5]:APKBUILD:15:variable set to empty string
This commit is contained in:
parent
ddb5d9ae2c
commit
c0b80b26b5
2 changed files with 5 additions and 4 deletions
|
@ -118,7 +118,11 @@ def rewrite(args, pkgname, path_original="", fields={}, replace_pkgname=None,
|
|||
# Replace fields
|
||||
for key, value in fields.items():
|
||||
if line.startswith(key + "="):
|
||||
line = key + "=\"" + value + "\"\n"
|
||||
if value:
|
||||
line = key + "=\"" + value + "\"\n"
|
||||
else:
|
||||
# Remove line without value to avoid lint error
|
||||
line = ""
|
||||
break
|
||||
|
||||
# Replace $pkgname
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue