Re: RPMs Module - Verification Method

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

 





On Fri, 14 Nov 2008, Milton Paiva Neto wrote:

First sorry for have sent the last mail twice, I had some problems with
the mail server.

Thanks Michael DeHaan and Phil for the help, the verification method is
working now :-) I also would like to thank Professor Chris for the help.

I had to use an asynchronous call to solve the socket time out problem.

This method should be added in the rpms module, after the inventory
method. I am sending the modified rpms.py file as an attachment.

How the RPM api in python does not have any function for verification, I
had to use the external command. I think the rpm api in python is not
very complete.



From: http://yum.baseurl.org/wiki/YumCodeSnippets

Report back the list of issues with an installed package (like rpm -V pkgname):

import yum
my = yum.YumBase()
pkgs = my.rpmdb.searchNevra(name='yum')
for pkg in pkgs:
    errors = pkg.verify()
    for fn in errors.keys():
        for prob in errors[fn]:
            print '%s - %s' % (fn, prob.message)




-sv

_______________________________________________
Func-list mailing list
Func-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/func-list

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

  Powered by Linux