On Mon, Aug 15, 2011 at 12:12:24PM -0500, Rex Dieter wrote: > On 08/15/2011 12:02 PM, Göran Uddeborg wrote: > > In a package review recently I was asked to put brackets around all > > macro usages. That is, writing > > %{name}.desktop > > rather than > > %name.desktop > > imho, using brackets is near-universally safer, but I doubt we need to > mandate it. If anyone's non-use of brackets ever does break anything, > that's their responsibility to fix I suppose. > To expand on this, just like shell, you can get into trouble if you write something like (contrived example): Source0: %namer%version.tar.gz But earlier in the spec file (or from one of rpmn's system-wide configs): %define namer foo One counter example is when the macro is itself a little script that needs to take arguments. In that case rpmbuild will hand the arguments to the macro when you do not use the curly braces but won't when you do (unless you include the arguments inside of the curly braces). See %py_byte_compile for an example of this. -Toshio
Attachment:
pgplCBzX9XcyO.pgp
Description: PGP signature
-- packaging mailing list packaging@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/packaging