Drop HAL in favor of udisks

Bug #625209 reported by Mathias Brodala
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Exaile
Fix Released
Wishlist
Johannes Sasongko

Bug Description

Since HAL is dying our device handling should be ported to udisks.

Here’s the D-Bus interface documentation: http://hal.freedesktop.org/docs/udisks/index.html

Mathias Brodala (mathbr)
tags: added: devices hal udisks
Revision history for this message
reacocard (reacocard) wrote :

Well, some combination of udev/udisks/gio, at any rate. Newer iPods don't show up as MSC devices so they wouldn't be seen by udisks or gio, but we need to use gio's services to monitor mounting for older iPods and straight-up MSC devices... Of course the other problem here is, afaik, there STILL is no stable python binding for libudev, despite everyone trying to push us off HAL.

Revision history for this message
Nicola Soranzo (nsoranzo) wrote :

I think that the you need to use the dbus-python bindings.

Revision history for this message
Johannes Sasongko (sjohannes) wrote :

I have experimental code for UDisks support, but it'll just be in addition to HAL support, considering we still have plugins that depend on HAL.

Changed in exaile:
status: Confirmed → In Progress
assignee: nobody → Johannes Sasongko (sjohannes)
Revision history for this message
Mathias Brodala (mathbr) wrote :

As long as HAL is only kept as a fallback I certainly don’t mind. :-)

Revision history for this message
Johannes Sasongko (sjohannes) wrote :

Current code can be seen in lp:~exaile-devel/exaile/udisks .

I'm using the CD plugin as testing ground, so I'm updating it at the same time. There's a slight annoyance with this--the plugin doesn't seem to work in trunk (even using HAL).

This code preserves HAL support. If you have both UDisks and HAL running (is that even possible?), you'll get duplicate devices.

At the moment CD support is still incomplete and doesn't detect insert/eject events, but it works if Exaile starts with the CD already inside. This bug shouldn't affect devices that work by plugging/unplugging (of course, the mass storage plugin will need to be modified to use UDisks first before we can test this).

Revision history for this message
reacocard (reacocard) wrote :

I don't think we should worry about keeping HAL support. It is thoroughly deprecated upstream and no recent distro ships it by default AFAIK. The only reason I've left HAL in Exaile is because there wasn't any alternative, so if we can port MassStorage over too (can't imagine it being too hard) I think we should just outright drop HAL.

Revision history for this message
Dustin Spicuzza (dustin-virtualroadside) wrote :

So... does this work?

Revision history for this message
Johannes Sasongko (sjohannes) wrote :

I think so; I'll give it a look within the next few days and hopefully merge it.

I'm not happy with the implementation (I've wanted to change it to use udev instead), but at least it's better than depending on HAL.

Changed in exaile:
milestone: 3.x → 3.4.0
Revision history for this message
Johannes Sasongko (sjohannes) wrote :

Finally merged this. The commit also adds UDisks support to the CD plugin, which can be used as a basis for porting other plugins (massstorage and... what else?).

The cd plugin is especially important to test. It would be appreciated if anyone could test with a portable CD drive--the plugin should detect both the drive being plugged in/out and CDs being inserted/ejected.

Note that the commit message says that it won't work with iPod, but a quick web search showed that there may be support for iPod in UDisks; I really have no idea and no way to test.

Changed in exaile:
status: In Progress → Fix Committed
Changed in exaile:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers