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!
Use: #%%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 altogether? This is very illogical, since the other #comments are ignored but this isn't.
*** This bug has been marked as a duplicate of 5364 ***