Are brackets around macros required?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In a package review recently I was asked to put brackets around all
macro usages.  That is, writing

  %{name}.desktop

rather than

  %name.desktop

I personally think these superfluous brackets clutter the spec file
and reduce the readability.  So when they are not necessary I always
omit them.

To me it somewhat strange that using brackets is more common than not
doing so.  The situation is quite analogous to shell scripts.  In
(ba)sh it is always ALLOWED to have brackets around variables, but
only rarely REQUIRED.  Exactly as it is for macros in spec files.  But
while you almost never see a shell script with brackets where they are
not needed, it is quite common in spec files.

Should the packaging guidelines have a ruling on this?  There isn't
any as far as I can find.  The closest I found was the choice between
%{buildroot} and ${RPM_BUILD_ROOT}, and in that case the only
requirement was consistency.  Is consistency the only requirement in
the choice between %{name} and %name too?  Or is the use of %{name}
with brackets actually required?
--
packaging mailing list
packaging@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/packaging


[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Forum]     [KDE Users]

  Powered by Linux