summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-11-25 22:02:47 +0100
committerAllan McRae <allan@archlinux.org>2012-12-14 03:35:34 +0100
commitc8417f3386155028015f7f9fc43f4c64a60acf4c (patch)
tree3fbe11be27ad567e7cd8d1062f88f52c7b5df703
parent5a5e712c749edb8bca448f119769d8bbe381c348 (diff)
downloadpacman-c8417f3386155028015f7f9fc43f4c64a60acf4c.tar.gz
pacman-c8417f3386155028015f7f9fc43f4c64a60acf4c.tar.xz
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 <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r--scripts/makepkg.sh.in2
1 files changed, 1 insertions, 1 deletions
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"