Bug 7907 - absolutely broken %include handling
Summary: absolutely broken %include handling
Status: CLOSED DUPLICATE of bug 5364
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 6.1
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 1999-12-20 19:39 UTC by vadim
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2000-01-31 16:18:07 UTC

Attachments (Terms of Use)

Description vadim 1999-12-20 19:39:38 UTC
%if blabla
%include file
will die (because it'll check if it's EOF and we're still in IF, but won't
check whether this file is the last one. Patch is obvious)

comments in %included file are not comments at all (i.e. if something is
inside comment, which is macro, it'll get processed)

Comment 1 Jeff Johnson 2000-01-31 16:11:59 UTC
Here's a workaround for 1:

# define arch specific variable
%{expand: %%{global} _is_%{_target_cpu} %%{nil}}

# include file only if is_blabla is defined (i.e. on arch blabla)
%{?is_blabla: %include file}

There is no work-around for 2) since macro expansion is entirely context free.
Moreover, you will find that there is a limit of the size of the expansion
buffer (8Kb) on the contents of file.

Comment 2 Jeff Johnson 2000-01-31 16:18:59 UTC
*** This bug has been marked as a duplicate of 5364 ***

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