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)

Attachment: signature.asc
Description: Digital signature

_______________________________________________
devkit-devel mailing list
devkit-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/devkit-devel

Reply via email to