RPM Community Forums

Mailing List Message of <rpm-users>

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

From: Stefan Westmeier <stefan_westmeier@hotmail.de>
Date: Thu 07 Feb 2008 - 16:25:31 CET
Message-ID: <BAY115-W1708301C1BAAF4589A70AD982E0@phx.gbl>

This was exactly what I was looking for. I will look into /usr/lib/rpm/rpmpopt-* for more interesting hints.
 
Thx,
Stefan



From: n3npq@mac.comSubject: Re: How to print list of required and provided packages via --qfDate: Thu, 7 Feb 2008 09:11:34 -0500To: rpm-users@rpm5.org

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 arrays,
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.
 
Yes.

Try
rpm -qa --qf '[Requires: %{REQUIRENAME}%{REQUIREFLAGS:depflags}%{REQUIREVERSION}\n]'

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

the [...] is an iterator over all values int the array, the :depflags specifies
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 16:25:35 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.