[packagekit] Implementation of searchFiles in APT backend

Matthias Klumpp matthias at nlinux.org
Fri Oct 23 08:19:30 PDT 2009


On Fri, 23 Oct 2009 09:08:23 +0200, Sebastian Heinlein <sebi at glatzor.de>
wrote:
> I haven't seen any code of the debconf part yet, but it should also be
> implementable in the python based backend.
> 
> Since PolicyKit-1 isn't available in KDE/Kubuntu yet I focused on the
> 0.4.x series of PackageKit. But Lucid will very likely ship with 0.5,
> so I am going to catch up with the new features soon.
Why am I able to compile & package PackageKit 0.5.3 on Ubuntu? PolicyKit is
enabled.

> How does your workaround work? Do you just run "apt-file -N -l search
> PATH"? This should not be hard to implement. But how do you handle
> apt-file update? Should this happen after every cache update?

Yes, I simpy run apt-file -l -N search and catch the output. Because
Listaller should be used on stable distributions, an apt-file update is
only made once. (The user is asked if an update should be done, and the
apt-file update is started with superuser rights)
Because the most important part for Listaller is to find the name of a
package which contains a necessary library, it is not needed to run
apt-file update after every cache update. (I don't know much Debian-based
rolling release distributions. On a normal software update no libraries are
added or removed and all packages are ABI stable, so apt-file update is not
necessary every time the cache changes. For distributions like Sidux the
user has to start the apt-file update manually via GUI)
The remove and addition of software sources is handled by an sources.list
watcher in a smaller service tool: If the sources.list changes, the user is
reminded to make an update of the apt-file cache.

What I could imagine for PackageKit is that if apt-file is available, the
searchFiles method uses this tool, if not it should fall back to the
current procedure. An apt-file update has to be done manually by the user.
It would also be possible to add a small config file which enables the
automatic update of the apt-file cache everytime software sources are
added/removed. (apt-file update does not lock the package db, so this
action can run in the background)




More information about the PackageKit mailing list