kickstart vs. yum

seth vidal skvidal at fedoraproject.org
Sat Feb 11 17:31:08 UTC 2012


On Sat, 11 Feb 2012 11:44:02 -0500 (EST)
Bryan Smith <bjs at redhat.com> 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




More information about the Kickstart-list mailing list