[Yum-devel] Sqlite improvements
Gijs Hollestelle
g.hollestelle at gmail.com
Sun Jan 23 12:12:59 UTC 2005
> I've finally managed to find some time to check out this patch. It works
> great and the code generally looks good. I can already see a few things
> that can be improved wrt pulling stuff out of the databases and I'd like
> to help work through Gijs' TODO items.
Hi Menno,
Thanks a lot for checking it out. Did you use the version from my
subversion repository because I've changed quite a bit since my last
post to this list.
Here is an overview of the major changes I have made since my previous post:
- When a new version of primary.xml.gz is available for some repo,
don't delete the old database, instead construct the new one from the
old one (i.e. delete packages that are no longer in the new one and
add those not in the old database) this speeds things up alot as
generally there will only be a small number of changes.
- Don't return actual YumAvailablePackage objects but I have created a
special subclass of this that can load data from the database on
demand (i.e. when yum 'asks' the package for its description it will
be fetched from the database instead of being present in memory for
all packages) this is not available for prco data yet, but I hope to
add that soon.
This makes yum info and yum search work.
- Some internal database tweaks: don't use the pkgId field (which is a
large string) but use a new pkgKey field (that is an INTEGER PRIMARY
KEY field generated automaticly by sqlite) to couple files and prco
data to a specific package. This makes the sqlite caches smaller and
allows them to be generated alot faster.
> Seth: Any chance of starting a branch for the sqlite work or is 2.1.13
> due any day now with the sqlite patches going into HEAD straight after that?
There are some outstanding TODOs that need to be addressed before it
can be added:
- Support for files.xml.gz (easy)
- Support for other.xml.gz (haven't looked at it yet)
When these are completed I think it could be added to the cvs version
of yum soon, if we add a special config file setting (p.e. sqlite=1)
to enable it and disable this setting by default, the patches can then
have some more extended testing.
The latest version is available from:
https://svn.win.tue.nl/viewcvs/yum-sqlite/trunk/
Regards,
Gijs
More information about the Yum-devel
mailing list