.SRCINFO generation differs from makepkg
Hi,
sometime ago the decision was made that devtools
always generates the .SRCINFO
file on builds. The .SRCINFO
contains the basic metadata in a plain and easily parsable format. The canonical way to generate the file is via makepkg --printsrcinfo
.
Description
The issue here is that the .SRCINFO
generated by devtools
doesn't collapse whitespaces like makepkg --printsrcinfo
does. Take this example PKGBUILD:
pkgname=foo
pkgver=1.0
pkgrel=1
pkgdesc="Lots of whitespace"
The pkgdesc
must become "Lots of whitespace", devtools
leaves it as is. This doesn't sound like a big issue, but can lead to invalid .SRCINFO
if the pkgdesc
contains newlines, like it did in haskell-language-c99
: haskell-language-c99/.SRCINFO@76dbff,
haskell-language-c99/PKGBUILD@76dbff
Analysis
devtools
doesn't call makepkg
, instead accessing the underlying function write_srcinfo_content
.
To make a long story short, just calling write_srcinfo_content
like makepkg
does isn't enough, shopt -s extglob
must also be specified. makepkg
does this, but devtools
does not.
-- Vekhir