RPM Community Forums

Mailing List Message of <rpm-users>

Re: How to print list of required and provided packages via --qf

From: Jeff Johnson <n3npq@mac.com>
Date: Thu 07 Feb 2008 - 15:11:34 CET
Message-Id: <114004AD-1B9D-4585-853E-A5CB1F85174F@mac.com>

On Feb 7, 2008, at 6:21 AM, Stefan Westmeier wrote:

> Hi,
> is there a way to get access to the required and provided list of  
> packages via a macro?

If you really want "packages", rather than the {N,EVR,F} dependency  
then you'll have to do some scripting.

> Using:
> rpm -qa --qf 'Requires: %{requires}\n'
> does not seem to the job. I only get one item printed.


	rpm -qa --qf '[Requires: %{REQUIRENAME}%{REQUIREFLAGS:depflags}% 

which is --requires (from /usr/lib/rpm/rpmpopt-*) slightly modified.

the [...] is an iterator over all values int the array, the :depflags  
the output format, and dependencies are a 3-tuple of {N,EVR,F}.

Is that what you want?

73 de Jeff
Received on Thu Feb 7 15:11:44 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.