[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 05:45:39PM -0500, seth vidal wrote:
> > 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.
> > 
> Jeff,
>  If I use a ts.closeDB() before I delete the ts object is that a safe or
> unsafe thing todo.

Depends ;-)

ts.closeDB() will disable lazy opens, so next use of ts will have
surprising results, i.e. no data will be read from database.

> I've not done an openDB() at all, just the closeDB() then del ts
> Am I damaging the opening mechanism in the process?

The only reason that ts.closeDB is there is to support a legacy
"greaced lightning" path through rpmlib from anaconda.

The path needs to die! die! die!, but then so does genhdlist, sigh.

You shouldn't have to do anything special with the rpmdb.

If so, then it's something that needs implementing and/or fixing.

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] []