Skip to content

Trigger udev rules parsing on all kernel events except of "remove".

Marcin Kocur requested to merge marcin2006/backends:fix-udev-rules into master

Linux kernel introduced new events for devices. My device is for example discovered on "bind" action which is not reflected in the sane's udev rules.

Quote from Lennart Poettering (systemd creator) on the line "ACTION!="add", GOTO="libsane_rules_end"" from sane udev rules:

"udev rules should be written in a style that a "change" event can be triggered any time, and the devices keep their properties. Writing rules that only set props on "add" are simply broken."

Systemd news on that: https://github.com/systemd/systemd/blob/28423d9a75cf3e740997545ca13429a93b27181c/NEWS#L5 Discussion on systemd mailing list about sane rules: https://lists.freedesktop.org/archives/systemd-devel/2020-October/045496.html

Please verify if the changes I made are correct, this is my first contribution to SANE. Feel free to reject this MR and fix appropriately.

//edit I can see one of the tests failed. Help appreciated :)

Edited by Olaf Meeuwissen

Merge request reports