[packagekit] Apt Sqlite branch
Tom Parker
palfrey at tevp.net
Wed Oct 10 11:09:47 PDT 2007
I've just committed my work with apt sqlite-caching to the main tree,
as I'm convinced that it's now in a better condition than the existing
apt backend. A couple of things are of note here.
1) After much deliberation, I'm now using a python helper script for
the refresh-cache action in apt, mainly because we can't gain anything
(i.e. caching) by using the C++ version, and this way we get to use
the easier route of python-apt rather than maintaining a separate copy
of the apt-get code.
2) backends/apt/ currently includes a couple of files that may well be
useful for the wider community of backend builders:
- sqlite-pkg-cache.{cpp,h} - non apt-specific sqlite cache code. Used
for searching an already built sqlite cache (built via
backend-specific callback functions).
- python-backend-common.{cpp,h} - currently, a single simple C
(should really rename from cpp) function that checks for network
connectivity, and then calls pk_backend_spawn_helper for the
backend-specific "refresh-cache.py". Notably, other backends that have
their own separate python code can use this, and this file will be
expanded in the future with other similar functions for common-named
python code.
The second point means that the PK_BACKEND_OPTIONS for the apt backend
is built from multiple sources, both apt-specific and generic
functions, thus (potentially) reducing the amount of backend-specific
code.
Tom
More information about the PackageKit
mailing list