Bug 6647

Summary: %define and %ifos don't work together
Product: [Retired] Red Hat Linux Reporter: luc.maisonobe
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1CC: jbotha
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-12-16 20:24:22 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:

Description luc.maisonobe 1999-11-02 15:52:18 UTC
When I used the following lines in a .spec file, the
%{varrotdir} macro is set to /usr/local even on a Linux box.

%ifos Linux
%define varrootdir   /usr
%else
%define varrootdir   /usr/local
%endif

After several trials (%ifos vs %ifnos, Linux vs solaris) it
seems the last alternative is always used, regardless of the
test.

This occurs with rpm 3.0.3.

Comment 1 jbotha 1999-11-02 21:22:59 UTC
This is similar to #5364, i.e. #defines are always executed inside if
statements in the order specified, regardless of whether that part of
the statement should be executed or not.

Comment 2 Jeff Johnson 1999-12-16 20:24:59 UTC
*** This bug has been marked as a duplicate of 5364 ***