Bug 2629
| Summary: | rpm-3.0 expands macros in %ifos too late | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | benedict |
| Component: | rpm | Assignee: | Jay Turner <jturner> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 6.0 | CC: | srevivo |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| URL: | Resent-Message-ID: <"r86zU.0.Oy4.XTCCt"@lists.redhat.com> | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 1999-05-24 19:56:06 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: | |||
Macros are correctly expanded before processing %ifX statements. Your example has a typo (iris6.5 vs. irix6.5), I can't tell which is wrong without examining uname(2) strings on an SGI platform. Please reopen this bug if there is still a problem. OK. Sorry about the typo. See Bug # 2873 The original problem for me was that I did not get any warning when I defined %irix6.x in a macro file - so I thought it was not expanded when I used a conditional such as %ifos %{irix6.x} |
The following spec file snippet should echo twice when built with buildos irix6.5 - in 3.0 it echos only once. %prep %define mymacro irix6.5 %ifos %{mymacro} echo "Expansion of ifos %{mymacro} is OK" %endif %ifos iris6.5 echo "Expansion of ifos %{mymacro} is OK" %endif The output is Executing: %prep + umask 022 + cd /tmp/benedict/BUILD-test-3.0 + echo Expansion of ifos irix6.5 is OK Expansion of ifos irix6.5 is OK + exit 0