Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 7399 - %if construct doesn't parse macro names correctly
Summary: %if construct doesn't parse macro names correctly
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 4.2
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 1999-11-28 21:02 UTC by yates
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 1999-11-29 14:17:51 UTC

Attachments (Terms of Use)

Description yates 1999-11-28 21:02:09 UTC
The %if construct doesn't recognize "_" as a legas first character in a
macro name.  For example
	%define _foo bar
	%if _foo == "bar"
gets an error, wheras
	%define foo bar
	%if foo == "bar"
does not.

Suggest changing line 265 in expression.c
	    } else if (isalpha(*p)) {
	    } else if (isalpha(*p) || *p == '_') {

Comment 1 Jeff Johnson 1999-11-29 14:17:59 UTC
This had been fixed in (at least) rpm-3.0.4. Thanks for the patch.

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