From c8417f3386155028015f7f9fc43f4c64a60acf4c Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sun, 25 Nov 2012 16:02:47 -0500 Subject: makepkg: normalize whitespace in $pkgdesc when writing .PKGINFO Specifically, we shouldn't allow newlines in the pkgdesc field, as pacman will ignore the continuation and end the description prematurely as written to the local DB. Normalize ALL whitespace, replacing it with single whitespace characters. Fixes strange errors as seen by FS#32852. Signed-off-by: Dave Reisner Signed-off-by: Allan McRae --- scripts/makepkg.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 800ab303..274aded2 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1721,7 +1721,7 @@ write_pkginfo() { printf "pkgname = %s\n" "$pkgname" (( SPLITPKG )) && echo pkgbase = $pkgbase echo "pkgver = $(get_full_version)" - printf "pkgdesc = %s\n" "$pkgdesc" + printf "pkgdesc = %s\n" "${pkgdesc//+([[:space:]])/ }" printf "url = %s\n" "$url" printf "builddate = %s\n" "$builddate" printf "packager = %s\n" "$packager" -- cgit v1.2.3-24-g4f1b