Bug 11485 - rpm 3.0.4 %define executed inside false %ifarch
Summary: rpm 3.0.4 %define executed inside false %ifarch
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: rpm
Version: 1.0
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-05-17 16:54 UTC by Stepan Kasal
Modified: 2008-05-01 15:37 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2000-05-17 16:55:21 UTC
Embargoed:


Attachments (Terms of Use)
a fix (546 bytes, patch)
2000-05-17 16:55 UTC, Stepan Kasal
no flags Details | Diff

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.


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