abuild: ensure that pkgdesc is a single line

If pkgdesc containes a newline, abuild generates an invalid .PKGINFO.
See https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/44042
This commit is contained in:
Jakub Jirutka 2023-02-10 01:03:24 +01:00 committed by Natanael Copa
parent d7f5c73806
commit 49ee073171
1 changed files with 3 additions and 0 deletions

View File

@ -207,6 +207,9 @@ default_sanitycheck() {
if [ $(echo "$pkgdesc" | wc -c) -gt 128 ]; then
die "pkgdesc is too long"
fi
if [ $(echo "$pkgdesc" | wc -l) -gt 1 ]; then
die "pkgdesc is not a single line"
fi
is_function package || die "Missing package() function in APKBUILD"
if [ -n "$replaces_priority" ] \