Re: Treating 'not found' packages as errors

seth vidal <[email protected]>
Newsgroups gmane.linux.rpm.yum
Message-ID <1208965814.26936.12.camel@cutter>
On Wed, 2008-04-23 at 17:45 +0200, Anders Blomdell wrote:
> seth vidal wrote:
> > On Wed, 2008-04-23 at 17:26 +0200, Anders Blomdell wrote:
> >>> My initial thought is if you want to use yum with scripted interactions
> >>> you can call the yum module api from python pretty easily these days.
> >>>
> >>> does that make sense?
> >> Yes, the software that handles updates is already in python.
> >>
> >> Are there any docs available for the API?
> >>
> > 
> > limited docs, lots of good examples, though.
> > 
> > For an easy way to get started look at:
> > http://fedoraproject.org/wiki/SethVidal/YumCodeSnippets
> 
> 1. I don't see any example equivalent to 'yum -update' there.
> 2. Is there any way to specify a custom configuration without writing a file and
> modify 'my.conf.config_file_path' ?


import yum
my = yum.YumBase()
# specify config file
my._getConfig(fn='/path/to/conf/file')
# update all
my.update()
my.resolveDeps()
my.processTransaction()



does that help? If you have immediate questions you can also pop in #yum
on irc.freenode.net - someone in there can frequently help.

-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.