Bug 13106

Summary: rpm -b doesn't ignore #%define
Product: [Retired] Red Hat Linux Reporter: Pekka Savola <pekkas>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED DUPLICATE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 7.1   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-07-10 11:20:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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 ***