On Dec 26, 2007, at 4:27 AM, Ralf S. Engelschall wrote:
> I've an rpmpopt file containing:
>
> | rpm alias --mark --define "__marker !#:+" \
> | --POPTdesc=$"mark package with Marker: <marker>" \
> | --POPTargs=$"<marker>"
> |
> | rpm alias --marked -a 'Marker=*' \
> | --POPTdesc=$"restrict query to marked packages"
>
> and a corresponding rpmmacros containing:
>
> | %description\
> | [...] \
> | %{?__hook_description_4}\
> | [...] \
> | %%description
> |
> | [...]
> | %__hook_description_4 %{?__marker:Marker: %{__marker}}\
> | %{nil}
> |
> | [...]
> | %_arbitrary_tags [...]:Marker:[...]
>
> This allows me to manually "mark" a package during rebuilding via "rpm
> --rebuild --mark foo", but the intended "rpm -q --marked" doesn't work
> as expected as the 'Marker=*' argument seems to be ignored. A "rpm
> -q --marked" just performs the "rpm -q -a" operation but without the
> restriction on the marked packages. A manual "rpm -q -a 'Marker=*'"
> OTOH
> works just fine. But this query syntax is too complicated to remember,
> so I really want to provide the --marked option.
>
> So, is this an intented POPT feature, or is there a bug, or do I just
> miss something important? For me it looks that with "rpmpopt" one can
> alias _options_ and _options plus option arguments_, but not _regular
> arguments_...
Yes, popt is an option processor, provides aliases/execs based on option
substitution, not argument substitution. But perhaps I misunderstand
what
you want.
So the lacki or regular argument substitution is neither a bug nor
intentional,
just noone has asked (or attempted) what you are trying to do.
My guess is that, at some point, adding --marked as a simple CLI
option in poptALL.c
(or a configuration macro) becomes far far easier than attempting the
layers of
complexity that you are adding to rpmpopt.
73 de Jeff
Received on Wed Dec 26 19:39:07 2007