udev-ish replacement for hal-cups-utils?

Martin Pitt martin.pitt at ubuntu.com
Tue Jul 14 09:32:14 PDT 2009


Hello Tim,

Tim Waugh [2009-07-14 14:20 +0100]:
> I wish I understood why any programs are still trying to munge command
> lines by replacing strings like '%p' on their own

We just discussed that in #udev, indeed stuff gets quoted if you use
these arguments in rules (pretty much because you do pass them as
command line arguments, into shells, etc.).

> In this case we actually need the text of the Device ID completely
> unaltered.  It's useless otherwise.

So, one immediate workaround would be to not pass the device ID
itself, but the path (%p) and just read that value plus "/ieee1284_id"
from the python program. That's a little tricky with identifying the
ID at removal time, though (you'd need to remember the quoted one as
well, i. e. consider that an abstract identifier for the real device
ID).

A more interesting approach is to use libgudev, which provides a
gobject-based interface to udev. Ideally it'd be easy to auto-generate python
bindings with gobject introspection, but I never did that before. I'll
look into that in the next days, and report back if that's a viable
approach.

Thanks,

Martin
-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/devkit-devel/attachments/20090714/117b6886/attachment.pgp 


More information about the devkit-devel mailing list