The following snippet %define AAAAAAAAA alphabetically first %define testmacro() echo %1 echo %{AAAAAAAAA} %testmacro a echo %{AAAAAAAAA} expands to echo alphabetically first echo a echo %{AAAAAAAAA} If I use ZZZZZZZZZ as the name, problem disappears: %define ZZZZZZZZZ alphabetically last %define testmacro() echo %1 echo %{ZZZZZZZZZ} %testmacro a echo %{ZZZZZZZZZ} expands to echo alphabetically last echo a echo alphabetically last
Macros are retrieved using bsearch which depends on having the list of macro names in sorted order so that a binary search works. There was a problem with the list not being sorted after an undefine, but I believe that I've fixed that. Can you verify if the problem exists in the latest rpm-3.0.3? If the problem does persist, can you send me an entire spec file (since I believe the problem is triggered by an undefine)? Thanks.
Fixed in CVS and will be in rpm-3.0.3-0.15). There was a missing sort after a popMacro which screwed up the bsearch lookup. Thanks for the spec file to reproduce.