Migrating suspend quirks away from hal
victor.lowther at gmail.com
Mon Nov 30 16:14:58 PST 2009
On Nov 30, 2009, at 9:00 AM, Martin Pitt <martin.pitt at ubuntu.com> wrote:
> 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
>> into its own script or rewriting it in a language that actually
>> 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.
That is exactly what I try to do, and performance is acceptable so far
(assuming the quirks are translated in advance). I will actually
profile it once I have reports from machines that actually require
> 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.
It will do for the short term.
> 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.
Cool. I should have a branch of pm-utils with native quirk db handling
(but not the native quirkdb, just the translator) out soon for testing
in the fd.o git repo soon.
> Martin Pitt | http://www.piware.de
> Ubuntu Developer (www.ubuntu.com) | Debian Developer
More information about the devkit-devel