[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, Mar 18, 2003 at 01:54:15PM -0800, 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.

Sure there is doco, both in *.c code, python help strings, and rpmapi doxygen
generated doco. Look again, please.

> What is anyone using as a replacement?

There is no direct replacement, as most programs are in no
position to handle concurrent access on a Berkeley DB.

There are equivalent methods for rpmdbMatchIterators defined
on a transaction object, that's probably what you are looking for.

Don't be confused by ts.openDB()/and ts.closeDB() methods, you don't want
or need these methods, lazy opens, and a conversion from O_RDONLY to O_RDWR,
are performed lazily when needed. In fact, if you use these methods,
you will disable lazy opens, and almost certainly be surprised.

And, if you really, really wanna be a Berkeley DB weeny, try the bsddb3
bindings, but please make sure to use the right version of Berkeley DB
(rpm-4.1 uses db-4.0.14, rpm-4.1.1/rpm-4.2 use db-4.1.25).

73 de Jeff

Jeff Johnson	ARS N3NPQ
jbj@redhat.com (jbj@jbj.org)
Chapel Hill, NC

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