Drop HAL in favor of udisks

Reported by Mathias Brodala on 2010-08-27
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Exaile
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

Related branches

Mathias Brodala (mathbr) on 2010-08-27
tags: added: devices hal udisks
Aren Olson (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.

Nicola Soranzo (nsoranzo) wrote :

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

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)
Mathias Brodala (mathbr) wrote :

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

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).

Aren Olson (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.

So... does this work?

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
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
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers