Bug 18010 - %{ } expands in comment
Summary: %{ } expands in comment
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm-build
Version: 7.0
Hardware: i386
OS: Linux
medium
low
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-10-01 10:24 UTC by Han-Wen Nienhuys
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2000-10-02 07:33:41 UTC
Embargoed:


Attachments (Terms of Use)

Description Han-Wen Nienhuys 2000-10-01 10:24:34 UTC
%{ } 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 05:31:13 UTC
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 07:33:39 UTC
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 17:12:54 UTC
And I'm the Big Bad Wolf :-)

Add the extra % ...

Comment 4 rhaig 2000-10-03 20:14:05 UTC
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.