[systemd-bugs] [Bug 88410] * glob works wrongly in 60-keyboard.hwdb
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Sun Jan 18 12:15:36 PST 2015
https://bugs.freedesktop.org/show_bug.cgi?id=88410
--- Comment #10 from Kay Sievers <kay at vrfy.org> ---
(In reply to Kay Sievers from comment #8)
> (In reply to Zbigniew Jedrzejewski-Szmek from comment #7)
> > > All file names are sorted, the file contents are applied record -by-record from top to bottom.
> > Kay, I think you're thiking about rules files. This is about the hwdb.
>
> No, all fine, this was about hwdb.
>
> > I added some debugging statements to figure this out.
> >
> > fnmatch trie: "*:bvr*:bd*:svnMICRO-STAR*:pn*U100*:pvr*" → yes
> > hwdb_add_property: KEYBOARD_KEY_f7 → reserved
> > hwdb_add_property: KEYBOARD_KEY_f8 → reserved
>
> These are the keys which are specified later in the source hwdb files, but
> they are applied first here. These later ones are supposed to overwrite the
> earlier ones. The "reserved" should win here.
>
> This is a bug in the hwdb code. Maybe it things changed recently regarding
> this logic?
Oh, we have multiple records with _different_ match strings which get merged.
I forgot about this detail there.
With different match strings, it should not be about the order in the
file, but about the length of the match string. The data is put in a
patricia trie and the order of individual records should _not_ matter for
_different_ match strings.
The intended behavior is that records with longer match strings overwrite
shorter match strings. That means, things which are stored "deeper" in the
tree are more specific/"better" matches than the broader ones stored closer
to the root. And the more specific ones should overwrite the broader ones.
Seem like this logic should be fixed.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20150118/8eec92d5/attachment.html>
More information about the systemd-bugs
mailing list