Migrating suspend quirks away from hal

Martin Pitt martin.pitt at ubuntu.com
Mon Nov 30 07:00:04 PST 2009


Hello Victor,

Victor Lowther [2009-11-25  8:43 -0600]:
> No, it translates the .fdi files that are currently on the system into a
> native format that uses bash-style extended regular expressions instead of
> the .fdi ad-hoc pattern matching scheme.

Ah, got it now. Since I am using KMS, the original script didn't write
out the translated files.

> No need, I already do that in the current script for convienence.  Once we
> actually decide that this is the way forward, moving the XML translation
> into its own script or rewriting it in a language that actually understands
> XML will be pretty easy.

I don't think that the translation script matters much. As long as it
is correct for the current set of quirks, it just needs to work once,
and from then on we keep maintaining the quirks DB in the new format,
in pm-utils itself. As already discussed, the current quirks DB is by
and large stable, for a lot of legacy hardware, so it won't change
that often.

A more interesting question is the performance of parsing/evaluating
the native files. They seem pretty verbose to me, but as long as you
only use bash commands/operations and avoid calling an external
program for each line, it shouldn't actually matter much.

Also, the file format and performance optimizations can then be done
easily, since they are an internal implementation detail of pm-utils
and don't affect anything else.

So, what do you think about committing the generated quirks into
pm-utils and removing the hal bits? Then we can ask submitters of new
quirks to report them to pm-utils first, instead of/in addition to
committing them to hal.

I just had a look at hal-info commit history, and we had some 30
quirks additions in 2009, and only one in the last three months.

Thanks,

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)


More information about the devkit-devel mailing list