diff between rpm's '--whatprovides' and '-f'

Ralf Corsepius rc040203 at freenet.de
Thu May 20 07:28:59 UTC 2004


On Wed, 2004-05-19 at 19:29, Michael Schwendt wrote:
> On 19 May 2004 13:46:00 -0300, Alexandre Oliva wrote:
> 
> > On May 19, 2004, Matt Hansen <helios82 at optushome.com.au> wrote:
> > 
> > > Ok, so where can I find a list of capabilities like the smtpdaemon?
> > 
> > rpm -qa --queryformat '%{name}-%{version}-%{release}: %{provides}\n'
> 
> Terribly incomplete (a bug?).

It's "bug" in Alexandre's format string.

%{provides} is a list, but the format string only prints the first
element of the list.

>  Compare
> 
>   rpm -qa --queryformat '%{name}-%{version}-%{release}: %{provides}\n' \
>     | grep postfix
> 
> with:
> 
>   rpm -q --provides postfix
> 
> The former lists only /usr/bin/mailq as provided by postfix. The latter
> lists many more including smtpdaemon.

Try this:

rpm -qa --queryformat '%{name}-%{version}-%{release}: [%{provides} ]\n'
| grep postfix

Note the '[..]'

Ralf





More information about the fedora-list mailing list