[Yum-devel] yum-utils repoquery

Paul Nasrat pnasrat at redhat.com
Sat May 20 13:26:48 UTC 2006


On Sat, 2006-05-20 at 01:43 -0700, Panu Matilainen wrote:
> On Thu, 18 May 2006, Mike Cvet wrote:
> 
> > Hey all,
> >
> > I'm new to yum development and was looking to implement --buildrequires
> > and --whatbuildrequires in repoquery via yum-utils.
> >
> > I've attached a patch for repoquery.py which adds functionality to the
> > above options, but am looking for any specific requirements which
> > further need to be implemented.
> 
> You can already do both queries without this patch:
> 
> --buildrequires:
> repoquery --archlist=src --requires <pkg>
> or repoquery --requires <pkg>.src
> 
> And --whatbuildrequires:
> repoquery --archlist=src --whatrequires <dep>
> or repoquery --whatrequires <dep> '*.src'



> I don't mind adding aliases for --buildrequires and --whatbuildrequires 
> but you could just reuse/enhance the existing logic for enabling src 
> archlist as needed for these operations instead of reinventing it :) Also 
> I think fmt_buildrequires() could be just: return self.fmt_requires() 
> instead of duplicating the functionality (unless I missed something...)

I don't think those queries work fully with --alldeps/resolve as you
don't have resolve all the deps of the package so if I build
requires /usr/bin/foo then we won't resolve that.

repoquery --archlist=src --whatrequires --alldeps desktop-file-utils |
grep kde

Grepping the specs:

./kdebindings/kdebindings.spec:BuildRequires: /usr/bin/desktop-file-install
./kdemultimedia/kdemultimedia.spec:BuildRequires: /usr/bin/desktop-file-install


Paul






More information about the Yum-devel mailing list