Bug 1169111
| Summary: | %(echo %1 | tr A-Z a-z) returns %1 | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Jens Petersen <petersen> |
| Component: | rpm | Assignee: | Packaging Maintenance Team <packaging-team-maint> |
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | jzeleny, lkardos, novyjindrich, packaging-team-maint, pknirsch, pnemade |
| Target Milestone: | --- | Keywords: | Reopened |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-12-02 07:39:26 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
Jens Petersen
2014-11-30 12:21:55 UTC
Yes, this is expected behavior. Body of %global is expanded at definition time. So expansion has following steps: %global lower() %(echo %1 | tr A-Z a-z) => %global %1 %lower CamelCase => CamelCase Use "%define" for lazy expansion: %define lower() %(echo %1 | tr A-Z a-z) %lower CamelCase => %(echo CamelCase | tr A-Z a-z) => camelcase Okay maybe I gave a bad test-case but I was actually using %define in my original more complex example but it is not working: re-opening. Nevermind sorry, you're right. This was caused by my using %global mymacro()\ %define lower %(echo %1 | tr A-Z a-z)\ : : (instead of %define mymacro() ...). |