Bug 1021628
Summary: | rpmbuild interprets lines which are commented out in spec files | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Martin Hecht <martin.hecht> |
Component: | rpm | Assignee: | Packaging Maintenance Team <packaging-team-maint> |
Status: | CLOSED NOTABUG | QA Contact: | BaseOS QE Security Team <qe-baseos-security> |
Severity: | low | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.4 | CC: | martin.hecht, pmatilai |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-10-22 06:50:03 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Martin Hecht
2013-10-21 16:48:05 UTC
This is expected behavior, see http://www.rpm.org/max-rpm-snapshot/ch-rpm-specref.html Hi Panu, Ok, but intuitively I wouldn't understand %define itself as a macro. If the macros which are already defined are expanded inside a comment, it wouldn't matter because the line is commented out anyway. The documentation explicitly speaks about multiline macros, that would add new lines which then "run out of the commented area", that's plausible. But %define rather seems to be a command than a macro, because it is not replaced by anything, but defines a macro. I would recommend to add an extra note to the documentation, that everything (including %define) is interpreted even on lines starting with a '#'-sign. The example with the %configure-macro nicely illustrates the problem with multiline macros, but the issue with %define is not that obvious. I must admit, that I have found the list of builtin macros (http://www.rpm.org/wiki/PackagerDocs/Macros#BuiltinMacros) now, which includes %define. But since this is different from the C-preprocessor for example, I would at least add the link to this list on the page of the documentation you have posted. best regards, Martin |