[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Automatically installing hardware specific packages

On Wed, Jun 16, 2010 at 11:09:32PM +0200, Josselin Mouette wrote:
> Le mercredi 16 juin 2010 à 21:33 +0200, Petter Reinholdtsen a écrit :
> > > Fedora 13 provides PackageKit to install hardware specific packages
> > > after installation.  Perhaps we should extend the discover system to
> > > listen to DBus events and install hardware packages also after
> > > installation?  Or port PackageKit to Debian and use it instead?
> > 
> > Anyone know how this work?
Basically PackageKit is just a common interface and a daemon to handle
transactions. The work is done by backends. The PackageKit daemon just
receives the request for a driver and routes it to the backend.

But you also need some client tools: The always running gpk-update-icon
and the DBus activated gpk-service tools from gnome-packagekit. Both run 
in the user session and listen to the session D-Bus. The tools provide the
end user dialogs and guide the user through the installation process:

AFAIK there are currently 3 ways to install drivers/firmware:

 * gpk-update-icon which is part of gnome-packagekit monitors
 * gpk-update-icon listens to the DeviceAdded signal of hal
 * gpk-service provides a InstallPrinterDriver method. I think that it
   called by the cups management application

The above clients call the WhatProvides method of the
system PackageKit daemon to query the corresponding packages.
Which is implemented differently by each backend. 

I haven't looked at the details of the yum backend which is used by
Fedora. The apt and aptcc backend don't provide any firmware/driver
query capabilities.

Furthermore there is a small tool in packgekit which rebinds devices to
tigger the loading of a recently installed firmware.

> PackageKit is not suitable for Debian, but Ubuntu reimplemented the same
> D-Bus interface on top of aptdaemon (session-installer). It has recently
> entered unstable.

Actually aptdaemon and sessioninstaller are not implemented by "Ubuntu",
but I get a lot of support and patches from Michael Vogt and Matthew
Paul Thomas.

Canonical's software-center is "just" the main user. I started to work
on the projects since I was a little bit frustrated about the design
limits of PackageKit. The packagekit daemon wants to keep things
simple and provide a complete backend for a basic package manager
- including search operations.

In contrast aptdaemon only handles the core methods which require root
privileges - but making use of advanced features (e.g. debconf support,
config file handling and since recently plugins and future cache 
calculation). The system DBus interface of aptdaemon is not compatible 
with the one of PackageKit. 

The search and query operations should be handled by the client
applications since a modern package management GUI needs a lot of
distro specific information, see software-center compared to
gpk-application or kpackagekit.

> This interface is able to install packages given their name - if it’s
> only for that, you can also use aptdaemon directly, the only advantage
> is that it’s the same as Fedora’s. 

Sessioninstaller implements the session DBus interface of PackageKit which is
provided by gnome-packagekit and kpackagekit, but uses synaptic or aptdaemon
for the installation. The interfaces should stay compatible in the
future, since third party software  is supposed to call the session interface to
install software, plugins, fonts, printer drivers or gstreamer resources.
The system interface should only be called by fully blown package managers.

Sessioninstaller currently supports installing by file name (requires
apt-file), by gstreamer resources and by mime type handler (requires
app-install-data). Printer drivers and fonts are not supported, since
there isn't yet any corresponding infrastructure in Debian or Ubuntu.

If you want to extend the interface we could discuss this on the
PackageKit list. Richard is generally open to improvements.

> In all cases this implies writing a session daemon that listens to
> events when hardware is plugged, and asks the user for conformation
> before installing hardware-specific packages. I don’t know whether the
> stuff from Fedora can be re-used.

I remember vaguely the hermes project of Guadalinex - an Ubuntu
derivate of the Spanish administration. It provided nearly the
same functionality. But it was some years back when I looked at the

Finally there is also jockey of Ubuntu. But I am not familiar
with it.



Attachment: signature.asc
Description: Digital signature

Reply to: