Bug 7399 - %if construct doesn't parse macro names correctly
Summary: %if construct doesn't parse macro names correctly
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
(Show other bugs)
Version: 4.2
Hardware: All Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
Keywords:
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:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-11-29 14:17:51 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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.