Assume .tablet files shadow any ones with the same name #831
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Commit 2dc213c introduced a duplicate resolution to fix #379 so that we could have a tablet file in /etc/libwacom that had a DeviceMatch that partially overlapped with a DeviceMatch in /usr/share/libwacom, e.g. in this setup:
DeviceMatch=usb|1234|abcd;bluetooth|1234|abcd
DeviceMatch=usb|1234|abcd
This triggered a bug: during the duplicate resolution the device match was removed from the currently parsed file, leading to the file having no device matches which triggered a g_warn_if_reached().
This approach is too complicated and likely unnecessary, use a more conventional approach where a named file hide the same file in any other datadir, i.e. /etc/libwacom/foo-bar.tablet will hide /usr/share/libwacom/foo-bar.tablet, the latter of which will not be parsed at all.
This corresponds to how e.g. system handles service files and many other components in the stack work with a similar approach.
Reverts commit 2dc213c ("libwacom: allow for duplicates across data directories")