Re: kickstart vs. yum

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

 



Understood.  I was referring more to piping the information out as you desire, hence the "P.S." (and not really part of my response).  But thank you for pointing out one should script around repoquery instead of yum, and that was an oversight on my part.

I also noted the comps.xml file in my "P.S.," which I've written Perl around in the past.  I've also done some custom Anaconda Python modification, but that was years ago (FC6/RHEL5 timeframe, long story, you might remember some of it).  I guess I was referring more to modifying the comps.xml file directly, to add new groups.  Is there a better method via the Python API to do such?  Or is it okay (or even best) to do it off-line, on the comps.xml file directly?


----- Original Message -----
From: "seth vidal" <skvidal@xxxxxxxxxxxxxxxxx>
Sent: Saturday, February 11, 2012 12:31:08 PM

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.

_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/kickstart-list


[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux