Bug 18010 - %{ } expands in comment
%{ } expands in comment
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: rpm-build (Show other bugs)
7.0
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Jeff Johnson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-10-01 06:24 EDT by Han-Wen Nienhuys
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-10-02 03:33:41 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Han-Wen Nienhuys 2000-10-01 06:24:34 EDT
%{ } macros in spec files are expanded in comments. This gives unexpected
effects if the substitution text has multiple lines (like %{_configure}
Comment 1 Nalin Dahyabhai 2000-10-02 01:31:13 EDT
I'd think this is the expected behavior, in case macro expansions are needed in
the comments, though it's seldom used.  Does escaping the macro name using the
form "%%{macro_name}" not give the desired text?
Comment 2 Han-Wen Nienhuys 2000-10-02 03:33:39 EDT
A .spec line like

# %{_configure} doesn't work

will expand to

# [goobledygook]
[more blah] doesn't work

and this will yield a error message from sh ("EOF found while looking for `''"),
which is at first sight entirely unrelated to the  .spec file.  

The content of comments should be ignored, and expanding in a comment should
have no effect, by definition, as far as I'm concerned. Either that or, all %{}
macros should be on a single line.

If this is a useful feature, then I'm little red ridinghood.

Comment 3 Jeff Johnson 2000-10-03 13:12:54 EDT
And I'm the Big Bad Wolf :-)

Add the extra % ...
Comment 4 rhaig 2000-10-03 16:14:05 EDT
I'm sure the workaround you've mentioned will work, but doesn't it seem odd to 
not ignore the comments?  perhaps rather than being marked resolved, this should
be changed to an enhancement req, marked low priority, and shuffled to the
bottom of the pile??

Note You need to log in before you can comment on or make changes to this bug.