Bug 2629 - rpm-3.0 expands macros in %ifos too late
rpm-3.0 expands macros in %ifos too late
Status: CLOSED DUPLICATE of bug 2873
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jay Turner
Resent-Message-ID: <"r86zU.0.Oy4.XTCC...
Depends On:
  Show dependency treegraph
Reported: 1999-05-07 05:34 EDT by benedict
Modified: 2015-01-07 18:37 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 1999-05-24 15:56:06 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description benedict 1999-05-07 05:34:40 EDT
The following spec file snippet should echo twice when built
with buildos irix6.5 - in 3.0 it echos only once.


%define mymacro irix6.5

%ifos %{mymacro}
echo "Expansion of ifos %{mymacro} is OK"

%ifos iris6.5
echo "Expansion of ifos %{mymacro} is OK"

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
Comment 1 Jeff Johnson 1999-05-14 14:35:59 EDT
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.
Comment 2 benedict 1999-05-17 05:53:59 EDT
OK. Sorry about the typo.
Comment 3 benedict 1999-05-17 09:30:59 EDT
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}
Comment 4 Jeff Johnson 1999-05-24 15:56:59 EDT
*** This bug has been marked as a duplicate of 2873 ***

Note You need to log in before you can comment on or make changes to this bug.