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

Re: specfile query of a specific package



On Wed, Jan 22, 2003 at 06:58:14PM -0700, 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? 

You can't.

> 
> 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? 

You want something like
	rpm -q --qf '[%{name}: %{requirename}]\n'
but that may or may not substitute for %{name} correctly.

73 de Jeff

-- 
Jeff Johnson	ARS N3NPQ
jbj@redhat.com (jbj@jbj.org)
Chapel Hill, NC





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