Bug 65719 - rpm gets parse error with nested %if in spec file
rpm gets parse error with nested %if in spec file
Product: Red Hat Linux
Classification: Retired
Component: rpm-build (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
Depends On:
  Show dependency treegraph
Reported: 2002-05-30 15:08 EDT by Karl E. Kelley
Modified: 2008-05-01 11:38 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-09-29 17:44:00 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
specfile that illustrates the problem (4.97 KB, text/plain)
2002-05-30 15:10 EDT, Karl E. Kelley
no flags Details
shorter test case (67 bytes, text/plain)
2002-06-27 19:32 EDT, David Juran
no flags Details

  None (edit)
Description Karl E. Kelley 2002-05-30 15:08:24 EDT
Description of Problem:
a parse error will result when a nested %if is coded in the false part of the
outer %if.  This does depend on how the actual variables are set.

Version-Release number of selected component (if applicable):

How Reproducible:

Steps to Reproduce:
1. cp test.spec /usr/src/redhat/SPECS/
2. rpm -bb /usr/src/redhat/SPECES/test.spec

Actual Results:
error: parse error in expression
error: /usr/src/redhat/SPECS/pam-pvmodules.test.spec:11: parseExpressionBoolean returns -1

Expected Results:
rpm should at least go through the rest of the spec file.  This particular
spec file is a trimmed version to illustrate the problem, and many things 
are missing from it.  

Additional Information: The spec file is provided as an attachment, it is not
completely functional as supplied.  the two build variables can be changed to
0 and one of the other nested if groups will give the error message
Comment 1 Karl E. Kelley 2002-05-30 15:10:52 EDT
Created attachment 58984 [details]
specfile that illustrates the problem
Comment 2 David Juran 2002-06-27 19:24:16 EDT
And this bug still exists in 7.3 )-:
Comment 3 David Juran 2002-06-27 19:32:39 EDT
Created attachment 62965 [details]
shorter test case
Comment 4 Bill Nottingham 2005-09-29 17:44:00 EDT
Closing bugs on older, no longer supported, releases. Apologies for any lack of

For RPM issues, please try a current release such as Fedora Core 4; if bugs
persist, please open a new issue.

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