Gentoo Archives: gentoo-dev

From: Peter Stuge <peter@×××××.se>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Adding USE=udev to linux profiles
Date: Fri, 20 Jul 2018 13:58:12
Message-Id: 20180720135804.19060.qmail@stuge.se
In Reply to: Re: [gentoo-dev] Adding USE=udev to linux profiles by Mart Raudsepp
1 Mart Raudsepp wrote:
2 > > * USE=udev means different things for different packages. You think
3 > > it "makes udev work" or whatever, but nobody has any idea what it
4 > > does for half of the packages that use it. The meaning is package-
5 > > specific, so the default should be package-specific.
6 >
7 > It makes hardware work without static configurations, including when
8 > hotplugged.
9
10 That's not really a complete description...
11
12 1. Linux always sends netlink messages on device changes.
13
14 2a. If running, udevd receives those messages and executes all udev rules.
15
16 2b. udevd then sends its own netlink messages, after executing rules.
17
18 3. libudev consumers receive messages from 2b.
19
20 libudev and udev in general is thus an abstraction of the kernel
21 information exposed in 1. It is possible, easy, and at times strongly
22 preferable to skip the udev stack and just consume 1. messages
23 directly. I know of at least one package which does exactly that
24 on USE=-udev, I can only emphasize that the meaning of USE=udev is
25 completely package-specific. There are several possibilities what to
26 do in an upstream package when libudev can or should not be used, and
27 I for one don't think profiles/ebuilds should neccessarily model them.
28
29
30 > It should be enable by default for all Linux users.
31
32 I disagree. Linux is used more widely than that.
33
34
35 > The default shouldn't be "nothing works, until you make it work".
36
37 I agree completely, but please don't assume that no Linux system will
38 work without USE=udev.
39
40
41 I think the viewpoint of rearranging profile inheritance makes a lot
42 of sense. Profiles are super powerful, expressive, and cheap! I think
43 it would be fine to add another level of inheritance for udev.
44
45 Maybe there is a clever trick with a profile for each desired USE flag?
46 Somehow dynamic profiles? Dunno - just an idea.
47
48
49 Thanks!
50
51 //Peter