RPM Community Forums

Mailing List Message of <rpm-devel>

Re: FYI: migrating the RPM DB between Berkeley-DB and SQLite

From: Anders F Björklund <afb@algonet.se>
Date: Thu 28 Jun 2007 - 12:06:41 CEST
Message-Id: <edf7e119b92fe3a619d19622b3c9ff25@algonet.se>
Ralf S. Engelschall wrote:

> As it is AFAIK not documented anyhwere and also far away from being
> obvious, here is a short tutorial for the RPM hackers on how to migrate
> the RPM DB of RPM 5 between Berkeley-DB and SQLite.

Thanks for the detailed information, I'll add some commands
that I found useful while troubleshooting my own migration:
(which turned out to be failed because RPM4 hadn't been able
to detect the sqlite3_open function in the sqlite library...)

# dump a Berkeley-DB database as text
/opt/local/lib/rpm/rpmdb_dump /opt/local/var/lib/Packages

# dump a SQLite database as text
echo .dump | sqlite3 /opt/local/var/lib/Packages

Where /opt/local is of course replaced with your RPM prefix,
values above are from the default "rpm" port for MacPorts.
(the default muggler version of magic(5) for Mac OS X will
identify the SQLite databases as something dull like "data")

--anders
Received on Thu Jun 28 12:06:44 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.