[Rpm-maint] [rpm-software-management/rpm] Implement %dnl (discard to next line) macro primitive for comment use (#753)
notifications at github.com
Tue Jun 18 10:26:15 UTC 2019
There has been no way to add comments to multiline macros, and while
spec files technically support #-commenting at beginning of lines, it
does not apply to all sections and causes generation after generation
of packagers to stumble on the same items over and over: macros
are expanded within spec comment lines, which makes commenting multiline
macros such as %configure annoying, comments inteded for scriptlets
end up being in the previous scriptlets body, and numerous other quirks.
This implements the M4-inspired %dnl macro primitive which literally
discards everything until the next newline (or end of string), without
expanding the contents. This allows comments to be used inside multiline
macros and everywhere in spec.
Caveat: in some places such as %description the newline doesn't actually
get discarded but this is a a spec parser issue, not on the macro side.
You can view, comment on, or merge this pull request online at:
-- Commit Summary --
* Implement %dnl (discard to next line) macro primitive for comment use
-- File Changes --
M doc/manual/macros (1)
M rpmio/macro.c (9)
M tests/data/macros.testfile (10)
M tests/rpmmacro.at (18)
-- Patch Links --
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Rpm-maint