rpmmodule.so and python 2.0

Olaf Trygve Berglihn olafb+usenet at pvv.org
Thu Dec 14 06:18:30 EST 2000


Olaf Trygve Berglihn <olafb+usenet at pvv.org> writes:

> I've compiled rpmmodule against the new python api. But when I try to
> user the interface to the rpm database, I get the following error:
> 
> Python 2.0 (#1, Dec 13 2000, 12:05:47)
> [GCC 2.95.2 19991024 (release)] on linux2
> Type "copyright", "credits" or "license" for more information.
> >>> import rpm
> >>> db = rpm.opendb( 0, '/' )
> cannot open file //var/lib/rpm/nameindex.rpm: Invalid argument
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> rpm.error
> >>>
<cut>

Hmmm. It seems that the rpmmodule and the rpm binary uses different
versions of the Berkeley DB:

Before rebuilding with rpm.rebuilddb( '/' ):

$ file /var/lib/rpm/nameindex.rpm
/var/lib/rpm/nameindex.rpm: Berkeley DB 1.85 (Hash, version 2, native byte-order)

After rebuilding with rpm.rebuilddb.( '/' ):

$ file /var/lib/rpm/nameindex.rpm
/var/lib/rpm/nameindex.rpm: Berkeley DB (Hash, version 5, native byte-order)


Olaf
-- 
Olaf Trygve Berglihn <olafb+usenet at pvv.org>



More information about the Python-list mailing list