[Fedora-packaging] Are brackets around macros required?

Michael Schwendt mschwendt at gmail.com
Wed Aug 17 21:46:43 UTC 2011


On Tue, 16 Aug 2011 13:18:05 -0400, TC (Tom) wrote:

> On 08/16/2011 12:23 PM, Göran Uddeborg wrote:
> > That must be a a bug.  Regardless of Fedora's packaging guidelines,
> > macros without brackets is legal purely syntactically.
> 
> How would it be able to identify macros without brackets?
> 
> Say you have:
> 
> %namev%version
> 
> Is the macro %namev? %name? %na?
> 
> It is sloppy form. It is impossible to parse. Just because rpm will 
> accept it doesn't mean you should use it.

RPM may accept it, but it cannot always parse it correctly either:

  echo "a=b" > %nameconfig.cfg

won't do the right thing even with %name being defined by default.
For

  echo "a=b" > %{name}config.cfg

to break similary, %name would need to be undefined.


More information about the packaging mailing list