Changes from Version 1 of YumCodeSnippet/VerifyPkg

Show
Ignore:
Author:
james (IP: 65.172.155.230)
Timestamp:
02/02/09 15:42:59 (9 years ago)
Comment:

move from code snippets page

Legend:

Unmodified
Added
Removed
Modified
  • YumCodeSnippet/VerifyPkg

    v0 v1  
     1Report back the list of issues with an installed package (like rpm -V pkgname): 
     2 
     3{{{ 
     4#!python 
     5my = yum.YumBase() 
     6pkgs = my.rpmdb.searchNevra(name='yum') 
     7for pkg in pkgs: 
     8    errors = pkg.verify() 
     9    for fn in errors.keys(): 
     10        for prob in errors[fn]: 
     11            print '%s - %s' % (fn, prob.message) 
     12 
     13}}}