Bug 7399 - %if construct doesn't parse macro names correctly
Summary: %if construct doesn't parse macro names correctly
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 4.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
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:
Clone Of:
Environment:
Last Closed: 1999-11-29 14:17:51 UTC
Embargoed:


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)) {
to
	    } 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.