Bug 58250 - Expansion of macros doesn't work in all cases
Summary: Expansion of macros doesn't work in all cases
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: rpm (Show other bugs)
(Show other bugs)
Version: 1.0
Hardware: i586 Linux
Target Milestone: ---
Assignee: Paul Nasrat
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2002-01-11 22:57 UTC by Sergey Ostrovsky
Modified: 2007-04-18 16:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-06-07 20:13:11 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Sergey Ostrovsky 2002-01-11 22:57:22 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.73 [en] (X11; I; SunOS 5.7 sun4u)

Description of problem:
Expansion of macros doesn't work when applied to parts of a statement, but on
the whole statement only.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:

1. Append to ~/.popt

rpmbuild	alias --config-with		--eval "%__autoconf_params_store	with	!#:+" \
		--POPTdesc=$"configure --with-<option> for build" \
2. Append to ~/.rpmmacros

%__autoconf_params_append()						\
    %{expand:%%global %{1} %%{!?%{1}:%%{nil}}%%{?%{1}:%%{%{1}} }%{2}}	\

%__autoconf_params_store()						\
    %__autoconf_params_append %{expand:__autoconf_params_%{1} %{2}}	\

3. Put in the %build section of the .spec file used for the test


4. Run

rpmbuild -bp --nodeps --config-with foo=bar <test-spec-file>

Actual Results:

error: Unterminated {: {expand:__autoconf_params_%{1}
  4<         (empty)
  3<       (empty)
error: Macro % has illegal name (%define)

Additional info:

Things work with the following definition of %__autoconf_params_store():

%__autoconf_params_store()							\
    %{expand:%%__autoconf_params_append __autoconf_params_%{1} %{2}}		\

Comment 1 Paul Nasrat 2005-06-07 20:13:11 UTC
This is an old bug, and although still valid on rpm 4.4.x I don't see any work
on the current macro parser in the forseeable future.  

You may wish to discuss on rpm-devel list for upstream RPM development


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