Bug 11485

Summary: rpm 3.0.4 %define executed inside false %ifarch
Product: [Retired] Red Hat Raw Hide Reporter: Stepan Kasal <kasal>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED RAWHIDE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 1.0CC: kasal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-05-17 16:55:21 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
a fix none

Description Stepan Kasal 2000-05-17 16:54:50 UTC
In construct like

%ifarch someotherarch
%define foo bar
%endif

the %define is expanded (thus %foo defined) even though it shouldn't.

The fix is that if spec->readStack->reading is 0, we skip the definition.
This may be done on low level (in %define, %global, ... definitions) or
at higher level: we simply don't call expandMacros() in copyNextLine()
function.
I like the latter more, see the attached patch.

Comment 1 Stepan Kasal 2000-05-17 16:55:59 UTC
Created attachment 248 [details]
a fix

Comment 2 Jeff Johnson 2000-06-21 23:34:05 UTC
Fixed in rpm-4.0-0.43 and rpm-3.0.5-0.4. Thanks for another critical fix.