Re: Treating 'not found' packages as errors

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

 



On Wed, 2008-04-23 at 20:31 +0200, Anders Blomdell wrote:

> now the problem is that this program:
> 
> #!/usr/bin/python
> 
> import yum, os, sys
> 
> my = yum.YumBase()
> my.conf.basecachedir = '/tmp/whereever'
> if not os.path.exists(my.conf.basecachedir):
>     os.makedirs(my.conf.basecachedir)
> my.conf.cache = 0
> my.repos.setCacheDir(my.conf.basecachedir)
> 
> my.install(name='xpdf')
> my.install(name='xwnc')
> my.resolveDeps()
> my.processTransaction()
> 
> when run as root correctly installs xpdf and xwnc, but when run as an ordinary
> user just quitely does nothing. How do I check if installation is successful?

take a look at the code for processTransaction() and the callback it can
take.
the callback will be helpful to you

and also take a look at what my.install() returns - it returns a list of
TransactionMember objects for the pkgs it added to the transaction.

-sv


_______________________________________________
Yum mailing list
Yum@xxxxxxxxxxxxxxxxxxxx
https://lists.dulug.duke.edu/mailman/listinfo/yum

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux