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

Re: Equivalent of Python rpm.opendb in 4.1?



On Tue, 2003-03-18 at 16:54, Bryan O'Sullivan wrote:
> I notice that the rpm.opendb function has gone away from the Python rpm
> module in the 4.1 era.  There's no documentation to suggest what the
> replacement might be, so I'm stuck.
> 
> What is anyone using as a replacement?
> 

create a transaction set

ts = rpm.TransactionSet()
iter = ts.dbMatch()

for item in iter:
  print item['name']

that should match all headers and print the name of the pkg.

A LOT OF changes in from rpm 4.0.4 to rpm 4.2

look in the src  - especially rpmts.c in the python subdir

-sv






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