[PATCH] Warn when whitespace is missing before macro body
Panu Matilainen
pmatilai at laiskiainen.org
Tue Jan 22 13:14:35 UTC 2013
On 01/21/2013 08:43 PM, Alexey Tourbin wrote:
Hi!
> This will now issue a warning when macro definition is possibly
> incorrect or ambigous, such as the one found in FC18 lvm2.spec:
>
> %define util-linux_version 2.22.1
> warning: Macro %util needs whitespace before body
Hmm. I like the idea, but the message is obscure (as of course is the
existing behavior). I'd be ready to bet the first reaction of packagers
seeing that would be filing "rpm macro parser has gone crazy" bugs
instead of fixing their macro names :)
I think it'd be better just to sanity check the name at define/undefine
time instead, eg change the COPYNAME() macro into a function which
validates the whole name as it goes and errors out on invalid
characters, or something to that effect.
P.S. In general, rpm-maint at lists.rpm.org is the more appropriate forum
for patch submissions, this is more of a user-oriented list.
- Panu -
More information about the Rpm-list
mailing list