Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 58250 - Expansion of macros doesn't work in all cases
Expansion of macros doesn't work in all cases
Product: Red Hat Raw Hide
Classification: Retired
Component: rpm (Show other bugs)
i586 Linux
medium Severity low
: ---
: ---
Assigned To: Paul Nasrat
Depends On:
  Show dependency treegraph
Reported: 2002-01-11 17:57 EST by Sergey Ostrovsky
Modified: 2007-04-18 12:38 EDT (History)
0 users

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

Attachments (Terms of Use)

  None (edit)
Description Sergey Ostrovsky 2002-01-11 17:57:22 EST
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 16:13:11 EDT
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.