GNOME Bugzilla – Bug 605920
Switch to (g)udev for device detection/support (deprecation of HAL)
Last modified: 2011-05-31 14:26:49 UTC
Please support devicekit, because hal is no longer in development and is deprecated in favor of devicekit. See http://www.freedesktop.org/wiki/Software/hal DeviceKit home page: http://www.freedesktop.org/wiki/Software/DeviceKit Posible replacements are libudev (http://www.kernel.org/pub/linux/utils/kernel/hotplug/libudev/) or GUDev (http://www.kernel.org/pub/linux/utils/kernel/hotplug/gudev/)
$:~/git/pitivi(master)$ git grep Hal pitivi/device.py: return HalDeviceProbe() pitivi/device.py:class HalDeviceProbe(DeviceProbe): pitivi/device.py: self.managerobj = self.bus.get_object('org.freedesktop.Hal', pitivi/device.py: '/org/freedesktop/Hal/Manager') pitivi/device.py: 'org.freedesktop.Hal.Manager') pitivi/device.py: dev = self.bus.get_object("org.freedesktop.Hal", pitivi/device.py: devobject = dbus.Interface(dev, 'org.freedesktop.Hal.Device')
Just to avoid confusion, DeviceKit is obsolete as well. Please use udev directly. I'm one of the udev maintainers, and happy to answer questions about the migration (I ported some projects myself, like gvfs).
Martin, Indeed we need to do this asap. One question though : where are the python bindings for (g)udev ?
Ah, it's python; sorry, I forgot about that. There are no Python bindings for gudev, I'm afraid. gudev builds gobject-introspection data, so the plan is to just use that once the gir support in pygobject is merged. Probing and querying devices can be done with the udevadm command line tool, but of course that doesn't provide any hotplugging capabilities. So I guess this needs to be postponed until gir support lands in pygobject.
If you are interested, you can start to play with Python dynamic bindings based on GObject-Introspection now: take a look here: http://live.gnome.org/PyGI
For the record, I linked https://bugs.launchpad.net/ubuntu/+source/pitivi/+bug/484707 to here.
Feel free to use the "See Also:" field for this.
For the record, I closed the Ubuntu bug, since in Lucid I changed hal to start on demand (through d-bus activation) instead of at boot time. This allows us to install pitivi by default without reintroducing hal into the boot time path.
Mmm, just saw this: http://github.com/nzjrs/python-gudev sounds like exactly what we need for this. :-)
Retitling slightly for clarity because this bug is damn hard to find when you need it.
Created attachment 153170 [details] [review] Allow pitiv to run without HAL Currently pitivi ends with dbus exception if HAL is not installed. This patch allows to run without hal (which is not a required dependency)
(In reply to comment #9) > Mmm, just saw this: > > http://github.com/nzjrs/python-gudev > > sounds like exactly what we need for this. :-) Martin, etc are you able to package this for Ubuntu?
(In reply to comment #12) > Martin, etc are you able to package this for Ubuntu? I can do this, if you guys want to port it. I'll see to doing that today.
(In reply to comment #12) > (In reply to comment #9) > > Mmm, just saw this: > > > > http://github.com/nzjrs/python-gudev > > > > sounds like exactly what we need for this. :-) > > Martin, etc are you able to package this for Ubuntu? There you go: https://launchpad.net/ubuntu/+source/python-gudev It's not the pristine upstream version, I had to do a couple of fixes to make it packageable. Upstream said they're fine and he's going to pull them soon: http://github.com/martinpitt/python-gudev/commits/master
I just pushed a fix based on Guillaume's patch (thanks!). It makes pitivi work without HAL. I'm leaving the ticket open since part of it, gudev support, isn't implemented yet. commit 6bed954d61cd41739261b76bd157ae4e2f6301b2 Author: Alessandro Decina <alessandro.d@gmail.com> Date: Mon Mar 1 12:30:48 2010 +0100 Allow pitivi to run without HAL. Partly fixes #605920. Based on a patch from Guillaume Bouchard.
commit 818ea643a7f33da842b5feec0e6573fafa7ced9c Author: Thibault Saunier <thibault.saunier@collabora.co.uk> Date: Thu May 26 12:22:50 2011 -0400 Remove HAL dependency
Jeff, the version this bug fixes is the coming one, ergo 0.14. That's what the target milestone field is for
Err... wait, this is not fixed in fact. The subject says "switch to gudev".
Yeah, I don't know why I set it to 0.15, it may have been before/during the milestone renaming or something. Or before we knew we could have a simple fix. Anyway, when I saw the "resolved fixed" mail I knew I had to look into the milestone being possibly off, just didn't have time to do so. Thanks for catching it for me! Do we still need to switch to gudev given that we are pulling out the (broken) webcam capture?
No we don't, I switch it from fixed to wontfixe then.