Comments in spec files (was Re: Plan for tomorrows (20070517) FESCO meeting)

Adam Jackson ajackson at redhat.com
Mon May 21 15:16:51 UTC 2007


On Sat, 2007-05-19 at 16:32 +0200, Michael Schwendt wrote:
> On Sat, 19 May 2007 16:11:15 +0200, Denis Leroy wrote:
> 
> > >> # Like this
> > >> ## or this in many script languages.
> > >>
> > >>> I remember a few years ago I was asked to remove all '# comments' 
> > >>> lines from scriptlets apparently because they "could cause problems"...
> > >>
> > >> No. You were only asked to not add such comment lines _after_ scriptlet
> > >> sections in the spec file, because the comments would be included in the
> > >> scriptlet bodies, even if a scriptlet section is passed to 
> > >> /sbin/ldconfig,
> > >> which doesn't understand the contents and breaks badly.
> > 
> > Not enough coffee. You meant "after scriptlet sections ON THE SAME LINE" 
> > as in
> > 
> > %post -p /sbin/ldconfig # bad comment
> 
> That one would not even rpmbuild. ;)
> 
> 
> Rule of thumb: Avoid comment lines after %post/postun/pre/preun (and likely
> also the trigger sections) up to the next non-scriptlet section.

Is anyone reporting these as "things we shouldn't have to care about" to
rpm-maint@ or the appropriate bugzilla?

- ajax




More information about the Fedora-maintainers mailing list