Bug 16843

Summary: nested %ifs don't work.
Product: [Retired] Red Hat Linux Reporter: Oleg Makarenko <omakarenko>
Component: rpm-buildAssignee: Jeff Johnson <jbj>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2   
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: 2000-08-24 08:59:18 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 Flags
the spec file that doesn't work none

Description Oleg Makarenko 2000-08-24 07:26:20 UTC
I activly use the following code in spec files:

%define test1 0
%define test2 0
%prep
%build

%if %{test1}
%if %{test2}
%else
%endif
%endif

That works ok with rpm 3.0.4-0.48 but fails with 3.0.5-9.6x. The error
message is:
parse error in expression
(spec file name):(%if %{test1} line number): parseExpressionBoolean returns
-1

The same script works fine if test1 == 1...

Comment 1 Oleg Makarenko 2000-08-24 07:27:59 UTC
Created attachment 2898 [details]
the spec file that doesn't work

Comment 2 Huang, Chih-Wei 2000-08-24 08:59:17 UTC
I encountered the same bug when I tried to rebuild
kernel 2.2.16-3 from updates by rpm 3.0.5-9.6x.
It worked fine with 3.0.4-0.48

Comment 3 Jeff Johnson 2000-08-24 15:11:30 UTC

*** This bug has been marked as a duplicate of 14463 ***