Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 13106 - rpm -b doesn't ignore #%define
Summary: rpm -b doesn't ignore #%define
Status: CLOSED DUPLICATE of bug 5364
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 7.1
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
Depends On:
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:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2000-07-10 11:20:14 UTC

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
Then %setup will not be run.  OTOH, if you change the _commented_ define
#%define blah 0
then %setup will be run!

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

#%%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
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.