Bug 13106 - rpm -b doesn't ignore #%define
rpm -b doesn't ignore #%define
Status: CLOSED DUPLICATE of bug 5364
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Jeff Johnson
Depends On:
  Show dependency treegraph
Reported: 2000-06-27 08:30 EDT by Pekka Savola
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:
Last Closed: 2000-07-10 07:20:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Pekka Savola 2000-06-27 08:30:24 EDT
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 15:48:49 EDT

#%%define blah 0
Comment 2 Pekka Savola 2000-07-10 07:20:12 EDT
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 15:29:17 EDT

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