On Wed, Feb 20, 2008, Elan Ruusamäe wrote:
> ~/.rpmmacros:
>
> %argtest(p:b:a:) %{-b:b=%{-b*}} 1=%1
>
> $ rpm -E "%argtest -p 1 -b 2 param1 param2"
> b=2 1=param1
>
> $ rpm -E "%argtest param1 param2 -p 1 -b 2"
> 1=param1
>
> thus, if parameters are passed before options, the options are not to be seen
Yes, the RPM macro parser uses positional options and does not support
permutations of options and arguments (as it was based on getopt and
because it makes sense for macros anyway). In latest RPM 5.1.DEVEL
it actually uses POPT and could support permutations but I strongly
recommend to keep it running like getopt there as else it would break
lots of macros, I guess.
Ralf S. Engelschall
rse@engelschall.com
www.engelschall.com
Received on Thu Feb 21 07:51:36 2008