Changes between Version 4 and Version 5 of YumCodeSnippets

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

add #!python

Legend:

Unmodified
Added
Removed
Modified
  • YumCodeSnippets

    v4 v5  
    66 
    77{{{ 
     8#!python 
    89import yum.packages 
    910import rpmUtils.transaction 
    1718Return the gpg signature info from a package: 
    1819{{{ 
     20#!python 
    1921import yum.packages 
    2022import rpmUtils.transaction 
    3032 
    3133{{{ 
     34#!python 
    3235from rpmUtils.miscutils import splitFilename 
    3336 
    4245 
    4346{{{ 
     47#!python 
    4448my = yum.YumBase() 
    4549my.install(name='somepackage') 
    5458 
    5559{{{ 
     60#!python 
    5661my = yum.YumBase() 
    5762my.conf.basecachedir = '/tmp/whereever' 
    7782Search for which package(s) own a file on the system 
    7883{{{ 
     84#!python 
    7985my = yum.YumBase() 
    8086pkgs = my.rpmdb.whatProvides('/boot/vmlinuz-2.6.23.9-85.fc8', None, (None, None,None)) 
    8692 
    8793{{{ 
     94#!python 
    8895my = yum.YumBase() 
    8996pkgs = my.rpmdb.searchNevra(name='yum') 
    99106 
    100107{{{ 
     108#!python 
    101109yb = yum.YumBase() 
    102110yb.conf.cache = os.geteuid() != 1