Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 571986 - sys-fs/udev: 40-gentoo.rules overrides 50-udev-default.rules for non-add events
Summary: sys-fs/udev: 40-gentoo.rules overrides 50-udev-default.rules for non-add events
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo systemd Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-15 12:40 UTC by Hector Martin
Modified: 2016-03-05 19:17 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hector Martin 2016-01-15 12:40:39 UTC
/lib/udev/rules.d/50-udev-default.rules mostly only applies its rules for 'add' events. However, /lib/udev/rules.d/40-gentoo.rules applies its rules unconditionally. These rules overlap with those in 50-udev-default.rules. This means that on 'add' events the values in 50-udev-default.rules take precedence, but revert to those in 40-gentoo.rules when a 'change' event happens.

This breaks USB printers after a 'change' event. The rule in 50-udev-default.rules sets the group to 'lp', but the rule in 40-gentoo.rules sets it to 'usb'.

Reproducible: Always

Steps to Reproduce:
1. Connect a USB printer
2. Either a 'change' event happens as a side-effect of something else, or trigger it manually, on the printer device (path is an example):
# udevadm trigger -v -c change /dev/bus/usb/001/003

3. Check the device group
Actual Results:  
Device file has group 'usb'

Expected Results:  
Device file has group 'lp'

You can flip flop between the two groups by alternately using udevadm trigger -c [add|change].
Comment 1 William Hubbs gentoo-dev 2016-03-05 16:11:44 UTC
In udev-229-r1, 40-gentoo.rules was modified so the rules only apply
during add events.

Please re-open if there is still an issue.

Thanks,

William
Comment 2 Mike Gilbert gentoo-dev 2016-03-05 18:20:00 UTC
Re-opening and assigning to systemd; we need to fix sys-apps/gentoo-systemd-integration, which has the same 40-gentoo.rules.
Comment 3 Mike Gilbert gentoo-dev 2016-03-05 19:17:30 UTC
Fixed in gentoo-systemd-integration-5.