Bug 443775
| Summary: | Cannot comment out macro definitions | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Stefan Ring <stefanrin> | ||||
| Component: | rpm | Assignee: | Panu Matilainen <pmatilai> | ||||
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | low | ||||||
| Version: | 8 | CC: | pnasrat | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2008-04-23 09:58:09 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
|
Description
Stefan Ring
2008-04-23 09:13:05 UTC
Created attachment 303461 [details]
Test .spec file
Where did my attachment go...?
Yup, macros are expanded even in comments. This is fairly well known and intended behavior, documented in RPM Guide and various other places. Quote from http://docs.fedoraproject.org/drafts/rpm-guide-en/ch09s02.html#id2970430 --- Avoid single percent signs, %, in comments. For example: # Added new commands to %prep The rpmbuild command may report an error of a second %prep section. To get around this problem, use two percent signs, such as %%prep, in spec file comments. --- Ok thanks for the clarification. It's not a very "discoverable" feature, I would say... Apparently that's the reason I haven't understood rpm macros for years - every attempt at playing around with them failed completely and utterly because I commented out something (or so I thought), and it didn't have any effect. Maybe vim and emacs syntax coloring rules should be changed for spec files. I tend to rely on the visual feedback for such mundane tasks. PS Sorry for the spam but somehow pressing a submit button always results in a flurry of new thoughts... ;) |