[Rpm-maint] [PATCH] forbid #%define
Per Øyvind Karlsen
pkarlsen at rpm5.org
Fri Jun 6 13:21:04 UTC 2008
2008/6/6 Pixel <pixel at mandriva.com>:
> 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...
> _______________________________________________
> Rpm-maint mailing list
> Rpm-maint at lists.rpm.org
> https://lists.rpm.org/mailman/listinfo/rpm-maint
>
if I understand you correctly, you suggest that editors (as in syntax
highligtning) should rather be adapted to treat correct
commenting out of macro properly and display them such, so that ie. %%macro
would be displayed as an commented out macro.
If I understand that correctly, I fully agree on it, the task of displaying
syntax highlightning properly seems better left to editors,
rather than rpm, so I'm all for! :)
Also, I do have to admit my other agenda of trying to avoid rather useless
incompatibilities in rpm.org vs rpm5.org.. (shoot me! ;p)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rpm.org/pipermail/rpm-maint/attachments/20080606/f5178ea7/attachment-0001.htm
More information about the Rpm-maint
mailing list