Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 674634 - dev-embedded/dfu-programmer-0.7.2-r1 udev rule does not handle bind
Summary: dev-embedded/dfu-programmer-0.7.2-r1 udev rule does not handle bind
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Embedded Gentoo Team
Depends on:
Reported: 2019-01-05 22:08 UTC by Marcin Sucharski
Modified: 2021-05-31 20:46 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---

emerge --info (emerge-info.txt,7.21 KB, text/plain)
2019-01-05 22:08 UTC, Marcin Sucharski

Note You need to log in before you can comment on or make changes to this bug.
Description Marcin Sucharski 2019-01-05 22:08:28 UTC
Created attachment 560056 [details]
emerge --info

Currently provided rules in 70-dfu-programmer.rules are invoked only when ACTION=="add". When driver is bound to the device new event "bind" is sent and udev rules are run again without preserving previous state (and "bind" event is not handled by ACTION=="add"). As a result symlink /dev/dfu-%n is deleted as soon as driver is bound to the device (it exists for very short time).

I have encountered this problem on system which is using OpenRC. Similar issue (unrelated to this package) has been reported to systemd:
I haven't look through patches there, however, it is possible that udev's device data preservation for "bind" and "unbind" events have been handled there on systemd's level instead of udev rules level. Thus I suspect that this issue may not be present on systemd installations.

Possible solution is to replace `ACTION=="add"` with `ACTION!="remove"` in the ebuild. This way symlink will be kept until device is removed. I've applied this change locally and it is working as expected on my system.