Bug 13106 - rpm -b doesn't ignore #%define
Summary: rpm -b doesn't ignore #%define
Keywords:
Status: CLOSED DUPLICATE of bug 5364
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 7.1
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-06-27 12:30 UTC by Pekka Savola
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2000-07-10 11:20:14 UTC
Embargoed:


Attachments (Terms of Use)

Description Pekka Savola 2000-06-27 12:30:24 UTC
This applies to both rpm 4.0 and rpm 3.0.

Commented %define statements won't be completely disregarded
when building RPM's from spec file.


Proof of concept.  If you put this at the top of your specfile:
----
# test
#%define blah 1
[ usual stuff ]
%if %{blah}
%setup -q
%endif
----
Then %setup will not be run.  OTOH, if you change the _commented_ define
to 
#%define blah 0
then %setup will be run!

Comment 1 Matt Wilson 2000-07-07 19:48:49 UTC
Use:

#%%define blah 0


Comment 2 Pekka Savola 2000-07-10 11:20:12 UTC
This is a pretty ugly, but working workaround, but cannot be the final solution.

So you must take special precausions if you want to comment out lines containing 
%defines in a spec file?  Shouldn't any lines beginning with '#' just be ignored
altogether?
This is very illogical, since the other #comments are ignored but this isn't.





Comment 3 Jeff Johnson 2000-07-10 19:29:17 UTC

*** This bug has been marked as a duplicate of 5364 ***


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