[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: specfile query of a specific package

it appears the Requires are stored in what the queryformat doc calls a 
parallel array.  so try this...it seemed to work for me:

rpm -q --qf '[%{=name}: %{requirename}\n]' --specfile <blah.spec>

if you only want one of the packages in a multipackage spec...well, i'd 
just pipe that to something like:  grep 'blah-doc:'
not sure if there's a built-in way to do that...



by the way...Skitz???

On Wed, 22 Jan 2003, Mike Snitzer wrote:

> I'm trying to pull out all the Requires for a specific package describe by
> a spec file that ultimately generates 2 binary rpms.  To be specific I
> have a mpich-gm.spec that when built creates binary rpms: mpich-gm and
> mpich-gm-doc  
> if i do the following I get a flood of all packages' requirements:
> > rpm -qR --specfile mpich-gm/SPECS/mpich-gm.spec
> rpmlib(VersionedDependencies) <= 3.0.3-1
> openssh-clients  
> gm  
> /bin/sh  
> mpich-gm = 1.2.4..8a
> /bin/sh  
> /bin/sh  
> if I do the following I only get the first requirement of each package:
> > rpm -q --qf '%{name}: %{requirename}\n' --specfile mpich-gm/SPECS/mpich-gm.spec
> mpich-gm: rpmlib(VersionedDependencies)
> mpich-gm-doc: mpich-gm
> I want to be able to query all requires of the first package described by
> the spec file; that is I would like to get something like:
> mpich-gm: rpmlib(VersionedDependencies)
> mpich-gm: openssh-clients
> mpich-gm: gm
> mpich-gm: /bin/sh
> So I have 2 questions:
> 1) is this possible to query a specfile (that describes multiple packages)
> for a specific package? 
> 2) how can I get: rpm -q --qf '%{name}: %{requirename}\n' <blah> 
> to return all requires not just the first one of each package described in
> the spec? 
> Thanks in advance.

[ James Blanding                   |  blandingj@cs.uri.edu            ]
[ Interim Systems Manager          |  Computer Science and Statistics ]
[ Office: 401.874.2701             |  Fax: 401.874.4617               ]

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []