How to close the RPMLOCK?

Tor Hveem <[email protected]> Fri, 6 Feb 2004 00:43:44 +0100
Newsgroups gmane.linux.redhat.rpm.python
Message-ID <[email protected]>
In newer versions of rpm-python some db operations takes a lock 
(/var/lib/rpm/RPMLOCK). My problem is that I'm not able to close that file 
from python. Many db operations opens that file, and I have been running out 
of file descriptors because rpmmodule.so opens the RPMLOCK file more than 
1024 times (which is my default file descriptor limit).

Can any of you guys tell me how I'm supposed to do this correctly?

What I have tried:

import rpm
ts = rpm.TransactionSet() # RPMLOCK is opened here
ts.closeDB()
del ts
del rpm
# The RPMLOCK file is still open here.

Any help appreciated.

Tor Hveem