Re: Treating 'not found' packages as errors

Anders Blomdell <[email protected]>
Newsgroups gmane.linux.rpm.yum
Message-ID <[email protected]>
seth vidal wrote:
> On Wed, 2008-04-23 at 18:11 +0200, Anders Blomdell wrote:
> 
>> Don't know yet, I have problems with changing the cachedir location, this naive
>> code extracted and combined from the wiki:
>> #!/usr/bin/python
>>
>> import yum, os, sys
>> # setup base objects
>> my = yum.YumBase()
>> # someplace you can write to as your user
>> my.conf.basecachedir = '/tmp/whereever'
>> if not os.path.exists(my.conf.basecachedir):
>>     os.makedirs(my.conf.basecachedir)
>> my.conf.cache = 0
> 
> after you do the above add:
> 
> my.repos.setCacheDir(my.conf.basecachedir)
> 
> 
> see if that takes care of it.
Yes,

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?

Best regards

Anders Blomdell

-- 
Anders Blomdell                  Email: [email protected]
Department of Automatic Control
Lund University                  Phone:    +46 46 222 4625
P.O. Box 118                     Fax:      +46 46 138118
SE-221 00 Lund, Sweden
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.