Java Mailing List Archive

http://www.redhatconfig.com/

Home » Red Hat Enterprise Linux 5 »

RE: [rhelv5-list] yum repository listing

Gerrard Geldenhuis

2008-04-29

Replies:

Author LoginPost Reply
> >
> > It would be handy to have a flag that can tell you what repos a
machine
> > would look in. Although I suppose yum list foobar is as good...
> >
> > I had a quick view through the source code for yum and it looks
> > relatively simple to do what I want but will probably turn out to be
a
> > fair bit of work...
>
> You can't have a flag without connecting to your Satellite server,
> because the list of Channels (== repos) that your client is connected
to
> is maintained on the Satellite Server.

I realize that. All I am saying is that one can use the "global"
getrepos function to collate all of the repo information regardless of
the plugins used by yum.

If one does write such a function it should work regardless of whether
you are using Satellite or not.

>
> The easiest way I know of getting that info from the Satellite is to
run
> Yum, although you could conceivably pick apart the RHN Yum plugin and
> find out how to do the query directly.

using yum as you first suggested is conceivably the best idea. coding a
solution in yum would just be scratching a very small itch

>
> The RHN plugin /usr/lib/yum-plugins/rhnplugin.py does this:
> rhnChannel.getChannelDetails()
>
> Which is imported from /usr/share/rhn/up2date_client/rhnChannel.py
>
> ... which could take a while to get to grips with ...
>
> Alternatively, you could script it with the RHN XML-RPC api:
> https://rhn.redhat.com/rhn/apidoc/channel/ChannelHandler.jsp
>

Regards

_______________________________________________
rhelv5-list mailing list
rhelv5-list@(protected)
https://www.redhat.com/mailman/listinfo/rhelv5-list
©2008 redhatconfig.com - Jax Systems, LLC, U.S.A.