Red Hat Bugzilla – Bug 99100
rpm macros can be read from comment sections.
Last modified: 2007-04-18 12:55:39 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225
Description of problem:
If a hapless spec file author has placed something like %prep within a comment
area of the spec file rpmbuild sees this as a second macro and exits with an
error. Previous versions of rpm did not have this problem.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Take a working spec file and put %prep within a comment before %prep
2. Try to rebuild the package.
Actual Results: You get an error that there is a second %prep at the line where
%prep target is given.
Expected Results: rpmbuild should ignore the commented section and not check
within it for
%prep or %install etc.
Yes. macros are expanded wherever they are found, and the
redhat-rpm-config package is now overloading %prep as a
Either add an escaping '%' before %prep in a comment, or
erase the redhat-rpm-config package.