Installing drivers, need new DeviceKit method

David Zeuthen david at fubar.dk
Fri Dec 12 07:19:54 PST 2008


On Fri, 2008-12-12 at 13:00 +0000, Richard Hughes wrote:
> Jon wants to automatically download drivers for his soundcard. The way I
> envisage this happening is:
> 
> 1. UDEV rule merges in PK_NEEDED_PACKAGE='alsa-firmware'
> 2. gnome-packagekit/kpackagekit watches DeviceKit for this key to appear
> 3. session triggers install if it's not already installed
> 
> Now, the udev rule can be shipped in udev-extras, or even PackageKit.
> What we also have to handle is when the soundcard is installed, and the
> computer boots. We need a way to enumerate all devices (of all
> subsystems) and check for keys.
> 
> Do we need a EnumerateDevices() method in DeviceKit, 

There are two such methods already; this one

http://hal.freedesktop.org/docs/DeviceKit/DeviceKit.html#DeviceKit.EnumerateBySubsystem
http://hal.freedesktop.org/docs/DeviceKit/DevkitClient.html#devkit-client-enumerate-by-subsystem

does what want, doesn't it? (pass an empty list of subsystems)

> or should
> gnome-packagekit be peeking in /sys?

The kernel won't know about PK_NEEDED_PACKAGE and we probably want to
keep it that way ;-)

      David




More information about the devkit-devel mailing list