Red Hat Bugzilla – Bug 13106
rpm -b doesn't ignore #%define
Last modified: 2008-05-01 11:37:56 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:
#%define blah 1
[ usual stuff ]
Then %setup will not be run. OTOH, if you change the _commented_ define
#%define blah 0
then %setup will be run!
#%%define blah 0
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.
*** This bug has been marked as a duplicate of 5364 ***