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 21:15 +0200, Anders Blomdell wrote:
>> seth vidal wrote:
>>> On Wed, 2008-04-23 at 21:02 +0200, Anders Blomdell wrote:
>>>> I have already found that out, the problem is that my.processTransaction()
>>>> silently refuses to install.
>>>
>>>> xpdf
>>>> xwnc
>>>> 10 Downloading Packages ()
>>>> 11 11 ([<yum.sqlitesack.YumAvailablePackageSqlite object at 0x956744c>,
>>>> <yum.sqlitesack.YumAvailablePackageSqlite object at 0xc525bac>],)
>>>> 20 Check Package Signatures ()
>>>> 30 Running Test Transaction ()
>>>> Running rpm_check_debug
>>>> 40 Running Transaction ()
>>> Well, in the case of the user - the transaction cannot be run, at all...
>>> Is that what you mean - when it is run as a user it is silent in its
>>> not-running-ness?
>> Exactly, and it makes me nervous that other things will silently be ignored as
>> well (even when running as root). I did not expect it to install anything when
>> run as an ordinary user, but I would like to get informed of what it couldn't
>> complete (which somehow brings me back to what started this thread).
>>
> 
> understood - if you break up what processTransaction() does you can get
> more feedback. However, things like the above are why we're going to be
> workin specific items to break in the yum api to make programming to it
> better and more reliable.
> 
> 
> If you're interested in adding some input it's welcome.
With the following change to runTransaction in __init__.py:

        import sys
        print >> sys.stderr, "Before"
        errors = self.ts.run(cb.callback, '')
        print >> sys.stderr, "After",errors

This is what I get from an strace:

write(2, "Before", 6)                   = 6
write(2, "\n", 1)                       = 1
futex(0x81ee458, FUTEX_WAKE, 1)         = 0
umask(022)                              = 022
open("/var/lib/rpm/__db.000", O_RDWR|O_CREAT|O_LARGEFILE, 0644) = -1 EACCES (Per
mission denied)
umask(022)                              = 022
open("/var/lib/rpm/__db.000", O_RDONLY|O_LARGEFILE) = 18
write(17, "error: can\'t create transaction "..., 62) = 62
close(18)                               = 0
write(2, "After", 5)                    = 5
write(2, " ", 1)                        = 1
write(2, "[", 1)                        = 1
write(2, "]", 1)                        = 1
write(2, "\n", 1)                       = 1

All very reasonable, except for the fact that no errors are returned. To me it
looks like rpmUtils is to blame.

Best regards

Anders Blomdell

> 
> -sv
> 
> 
> _______________________________________________
> Yum mailing list
> [email protected]
> https://lists.dulug.duke.edu/mailman/listinfo/yum


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