Re: kickstart vs. yum

seth vidal <[email protected]>
Newsgroups gmane.linux.redhat.kickstart.general
Message-ID <20120211123108.43981ef0@opus>
On Sat, 11 Feb 2012 11:44:02 -0500 (EST)
Bryan Smith <[email protected]> wrote:

> An explanation of the four (4) different levels for packages is here,
> along with most of the other information, guidelines and standards
> for comps.xml:  
> -
> http://fedoraproject.org/wiki/How_to_use_and_edit_comps.xml_for_package_groups
> 
> As Jason pointed out, "yum groupinfo" is a nice, easy, client-based
> interface into the comps.xml for any group, its packages and the
> levels for packages.
> 
> And like "yum grouplist -v", one can use "yum groupinfo -v" as well.
> The latter will give you the Anaconda installation or YUM repo an
> installed packaged has come from, or the YUM repo it is available
> from.
> 
> -- Bryan
> 
> P.S.  As always, one can script the output from YUM to one's taste or
> fetch the comps.xml directly and work on it with their preferred XML
> method(s).
> 

Hi Bryan,
 yum's cli is not intended to be scripted. Don't recommend that to
others.

If you want to script to yum you should use either of the following:
 - repoquery
 - yum's python api
 

The yum python interface for working with the comps file is actually
pretty straightforward
 as an example

#!/usr/bin/python
import yum
my = yum.YumBase()
my.setCacheDir()
for g in my.comps.groups:
    print g.groupid

core = my.comps.return_group('core')
for pkg in core.packages:
    print pkg





lots to explore in there - I recommend using ipython to help you
explore the interface.


-sv
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.