Changes between Version 1 and Version 2 of YumCodeSnippet/OpenLocalPkg

Show
Ignore:
Author:
james (IP: 65.172.155.230)
Timestamp:
10/01/10 15:15:06 (6 years ago)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • YumCodeSnippet/OpenLocalPkg

    v1 v2  
    33{{{ 
    44#!python 
     5 
     6# This works in all versions of yum: 
     7 
    58import yum.packages 
    69import rpmUtils.transaction 
    710ts = rpmUtils.transaction.initReadOnlyTransaction() 
    811lp = yum.packages.YumLocalPackage(ts, '/home/skvidal/yum-3.2.8-1.noarch.rpm') 
     12 
     13# In newer version though you can just do: 
     14 
     15import yum.packages 
     16lp = yum.packages.YumLocalPackage(filename='/home/skvidal/yum-3.2.8-1.noarch.rpm') 
    917}}} 
    1018