After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 605920 - Switch to (g)udev for device detection/support (deprecation of HAL)
Switch to (g)udev for device detection/support (deprecation of HAL)
Status: RESOLVED WONTFIX
Product: pitivi
Classification: Other
Component: General
Git
Other Linux
: High normal
: 0.14
Assigned To: Pitivi maintainers
Pitivi maintainers
Depends on:
Blocks: 593938
 
 
Reported: 2010-01-02 20:21 UTC by Javier Jardón (IRC: jjardon)
Modified: 2011-05-31 14:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Allow pitiv to run without HAL (1.42 KB, patch)
2010-02-06 23:09 UTC, Guillaume Bouchard
none Details | Review

Description Javier Jardón (IRC: jjardon) 2010-01-02 20:21:43 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/)
Comment 1 Javier Jardón (IRC: jjardon) 2010-01-02 20:22:43 UTC
$:~/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')
Comment 2 Martin Pitt 2010-01-04 15:36:35 UTC
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).
Comment 3 Edward Hervey 2010-01-05 09:55:08 UTC
Martin, Indeed we need to do this asap. One question though : where are the python bindings for (g)udev ?
Comment 4 Martin Pitt 2010-01-05 10:45:04 UTC
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.
Comment 5 Javier Jardón (IRC: jjardon) 2010-01-05 15:26:26 UTC
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
Comment 6 Jean-François Fortin Tam 2010-01-05 15:40:55 UTC
For the record, I linked https://bugs.launchpad.net/ubuntu/+source/pitivi/+bug/484707 to here.
Comment 7 André Klapper 2010-01-05 15:43:20 UTC
Feel free to use the "See Also:" field for this.
Comment 8 Martin Pitt 2010-01-05 15:52:36 UTC
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.
Comment 9 Martin Pitt 2010-01-22 17:58:28 UTC
Mmm, just saw this:

  http://github.com/nzjrs/python-gudev

sounds like exactly what we need for this. :-)
Comment 10 Jean-François Fortin Tam 2010-02-06 22:32:12 UTC
Retitling slightly for clarity because this bug is damn hard to find when you need it.
Comment 11 Guillaume Bouchard 2010-02-06 23:09:30 UTC
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)
Comment 12 John Stowers 2010-02-08 22:35:41 UTC
(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?
Comment 13 Martin Pitt 2010-02-09 07:03:46 UTC
(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.
Comment 14 Martin Pitt 2010-02-09 12:08:00 UTC
(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
Comment 15 Alessandro Decina 2010-03-01 11:57:13 UTC
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.
Comment 16 Thibault Saunier 2011-05-31 00:30:03 UTC
commit 818ea643a7f33da842b5feec0e6573fafa7ced9c
Author: Thibault Saunier <thibault.saunier@collabora.co.uk>
Date:   Thu May 26 12:22:50 2011 -0400

    Remove HAL dependency
Comment 17 Edward Hervey 2011-05-31 10:19:12 UTC
Jeff, the version this bug fixes is the coming one, ergo 0.14. That's what the target milestone field is for
Comment 18 Edward Hervey 2011-05-31 10:21:19 UTC
Err... wait, this is not fixed in fact. The subject says "switch to gudev".
Comment 19 Jean-François Fortin Tam 2011-05-31 12:24:29 UTC
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?
Comment 20 Thibault Saunier 2011-05-31 14:26:49 UTC
No we don't, I switch it from fixed to wontfixe then.