[pacman-dev] [RFC] Generation of a .SRCINFO file for source packages

canyonknight at gmail.com canyonknight at gmail.com
Mon Aug 27 22:23:45 EDT 2012


On Mon, Aug 27, 2012 at 8:51 PM, Dave Reisner <d at falconindy.com> wrote:

<snip>

>> - Every variable (pkgver, depends, etc) is preceded by ($pkgname).
>
> I don't like this. Why surround it with parenthesis? pacman in git is
> already fairly strict about what it allows in pkgname=, so if you're
> going to advertise this columnar format, I'd say just leave it
> untouched. (i.e. pkgname="foo bar" won't get past makepkg). The extra
> characters wrapping the name just makes parsing a little more tedious.

My mistake, you are correct parentheses are unneeded thanks to the
strictness of makepkg.

<snip>

> As a counter example, what about the following. Similar to how we do
> the pacman DBs, each package is a "field", e.g.
>
> %PACKAGE%
> pkgname = boost
> pkgver = 1.50.0
> depends = boot-libs=1.50.0
> ...
>
> %PACKAGE%
> pkgname = boost-libs
> pkgver = 1.50.0
> depends = icu
> depends = zlib
> depends = bzip2
> ...
>
> Each section is delimited with a blank line, with the field name telling
> the parser ahead of time what sort of data to expect next.
>

I do think there is a certain nicety to my proposal where any random
line can be parsed and the parser can know the package name and the
variable declaration from that single line. I like your proposal as
well though, and would be more than happy with it. Thanks for your
response Dave.

Regards,

Jason


More information about the pacman-dev mailing list