[Rpm-maint] [PATCH] forbid #%define

Pixel pixel at mandriva.com
Fri Jun 6 13:04:57 UTC 2008


Panu Matilainen <pmatilai at redhat.com> writes:

> A very straightforward and simple rule would be "if the first
> character of the text to process starts is "#", braces are required to perform
> macro expansion"

i'd rather not introduce such a difference between %foo and %{foo}
just for the sake of comments. Too surprising IMO.

i'd say the more important is that spec editors should be adapted to
rpm's behaviour. currently "#%define ..." is displayed as comments in
vim/emacs. One way to fix would be to only fix the vim/emacs mode.


instead of %foo vs %{foo}, we could do something like:

%build
cat << EOF > example.conf
# To enable feature foo, uncomment the following:
#[myplugin]
%{expand:#pluginpath = %{_libdir}/%{name}/myplugin.so}
EOF

a bit ugly, but quite clear...



More information about the Rpm-maint mailing list