On Fri, Jul 22, 2022 at 8:47 AM Sven Schreiber <svetosch(a)gmx.net> wrote:
it seems that in spec files comments started with '#' sometimes work and
sometimes don't work. For example, this line doesn't cause any problem:
min-version = 2021a # due to _()
but a line like the following does:
gui-main = some_public_func # just this one
Namely, I get an error saying unknown public function. But if I move the
comment to a new line, everything works. Now, I can live with inline
comments not being allowed there, but the error message is misleading
and I'm not sure that the aim is really not to support comments, maybe
this is just a side effect of some bug.
There's no bug, just no specific intent to accept #-style comments
(or any style of comments). This is not hansl, and the packaging doc
doesn't mention comments in a spec file. The line-specific parser is
apparently OK with ignoring trailing "junk" (comments) in some cases
but not in others. Adding support for comments in package spec files
would be a reasonable feature request, but as things stand you get
lucky or you don't, it's "undefined behavior". It would be wrong to
say that "the aim is not to support comments," but correct to say that
there's no aim to support them.
Allin