Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 7907 - absolutely broken %include handling
Summary: absolutely broken %include handling
Keywords:
Status: CLOSED DUPLICATE of bug 5364
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 6.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
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:
Environment:
Last Closed: 2000-01-31 16:18:07 UTC


Attachments (Terms of Use)

Description vadim 1999-12-20 19:39:38 UTC
1)
%if blabla
%include file
%endif
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)

2)
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.