Pehaps the most requested feature over the last year has been
Why doesn't rpm use sqlite3 for installed packages?
The RFE comes in waves, at least weekly, sometimes several times a day.
Somehow the implementation used by rpm is getting confused with the
schema design. Without a reasonable schema, all databases, sqlite3
included, will be deficient.
So in order to stop wasting time explaining the reasons why rpm
continues
to use Berkeley DB rather than sqlite3, I prefer instead to reply:
Show me your schema. rpm will use the fastest retrieval available.
Schema design is rather harder than implementations. To assist with
getting reliable objective input on rpmdb design, I have taken the
existing, widely used, rpm-md markup used by yum, pyrpm, smart, and
likely several other implementations and tied it to existing rpm
metadata.
RPM-5.1 (to be released in the next week or so), includes popt CLI
aliases
to display package metadata in the existing XML format used in
primary, filelists,
other, and repomd:
--yum:primary.xml
--yum:filelists.xml
--yum:other.xml
E.g. the primary.xml for the popt package can be displayed by
displayed by running
rpm -q --yum:primary.xml popt
(aside) Lest I be accused of misrepresentation, note that there is no
desire
to use the existing YUM repo-md for any purpose what so ever. The
repo-md format
lacks critical elements necessary to install packages, starting with
stat(2) information
for files. So there is no intent by me, or rpm5, to supply identical
(to YUM) repo-md
output. I certainly can supply an implementation that is identical if
necessary or desired.
Since XML as a choice for representing package metadata seems to be
being phased
iout (judging from the latest createrepo-0.9.4-3.fc9 package, which
does not appear to
populate filelists.xml.gz, and the addition of a --db-only option in
createrepo git),
I have also implemented 3 additional popt aliases to display the
actual SQL import
commands that are fed to sqlite3 to load metadata into sqlite3:
--yum:primary.sqlite
--yum:filelists.sqlite
--yum:other.sqlite
Which brings me to the topic: the existing --queryformat makes it
rather trivial to
prototype whatever sqlite schema one desires using existing rpmdb
metadata.
So take your best shot SQL shot BDB haters! Now's your chance to use
sqlite3!
Again, rpm5 will use the fastest available database back-end as default.
73 de Jeff
Received on Tue Apr 1 19:11:09 2008