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: Always Steps to Reproduce: 1. Append to ~/.popt rpmbuild alias --config-with --eval "%__autoconf_params_store with !#:+" \ --POPTdesc=$"configure --with-<option> for build" \ --POPTargs=$"<option>" 2. Append to ~/.rpmmacros %__autoconf_params_append() \ %{expand:%%global %{1} %%{!?%{1}:%%{nil}}%%{?%{1}:%%{%{1}} }%{2}} \ %{nil} %__autoconf_params_store() \ %__autoconf_params_append %{expand:__autoconf_params_%{1} %{2}} \ %{nil} 3. Put in the %build section of the .spec file used for the test %dump 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}} \ %{nil}
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 https://lists.dulug.duke.edu/mailman/listinfo/rpm-devel/