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:
Oliver Smith 2020-05-12 20:13:38 +02:00
parent ddb5d9ae2c
commit c0b80b26b5
No known key found for this signature in database
GPG Key ID: 5AE7F5513E0885CB
2 changed files with 5 additions and 4 deletions

View File

@ -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

View File

@ -8,12 +8,9 @@ pkgrel=1
pkgdesc="Tools necessary to build programs for armhf targets"
url="https://www.gnu.org/software/binutils/"
depends=""
makedepends_build=""
makedepends_host=""
makedepends="gettext libtool autoconf automake bison texinfo"
arch="armv7 aarch64 x86_64 x86"
license="GPL-2.0 GPL-3.0-or-later LGPL-2.0 BSD"
subpackages=""
source="https://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.bz2
x86-Add-a-GNU_PROPERTY_X86_ISA_1_USED-note-if-needed.patch
x86-Properly-merge-GNU_PROPERTY_X86_ISA_1_USED.patch