Gentoo Archives: gentoo-dev

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: About udev-145: new features / extras and kernel requirements
Date: Sun, 30 Aug 2009 10:18:15
Message-Id: pan.2009.08.30.15.26.35@cox.net
In Reply to: Re: [gentoo-dev] About udev-145: new features / extras and kernel requirements by Arun Raghavan
1 Arun Raghavan posted on Sun, 30 Aug 2009 19:54:47 +0530 as excerpted:
2
3 > 2009/8/30 Matthias Schwarzott <zzam@g.o>:
4 >> Hi there!
5 >>
6 >> The new udev-145 and newer have some new kernel requirements. How
7 >> should the ebuild verify they are met?
8 >> Some possible ways:
9 >> 1. Check config under /usr/src/linux
10 >> 2. Check /proc/config.gz
11 >> 3. Print message for user in pkg_postinst
12 >
13 > All of the above? Rationale being (1) is required to check against the
14 > kernel you're supposedly using, (2) for the kernel you definitely are
15 > using, and (3) to make sure people remember.
16
17 Indeed, all of the above, but not requiring the first two only giving
18 their status in #3.
19
20 Some people don't have the kernel option enabling /proc/config.gz turned
21 on, so #2 isn't reliable, and #1, /usr/src/linux, could point who /knows/
22 where, maybe something current, maybe not. (Here, it points at my local
23 kernel git repo... which may or may not correspond to the currently
24 running kernel, tho it's usually reasonably close, and it's usually
25 within a few days of upstream unless I'm git bisecting some bug.)
26
27 Thus, neither of the first two is reliable, but checking them and putting
28 the status in #3 should be helpful.
29
30 Another alternative, ultimately safer: add another option, and require
31 that at least one of the three pass:
32
33 1-2 as they are.
34
35 3. Check UDEV_ASSUME_KERNEL_OPTS in the environment (could be set in
36 make.conf for portage and compatible PMs).
37
38 Then in the message corresponding to the original #3 except presumably in
39 unpack or prepare, report status as a reminder, and die if none of the
40 above tests pass. #3, the env var, would allow users to override without
41 hacking the ebuild itself, if for some reason they decided they needed
42 to. If it's the only one that passes, ewarn/eerror to the effect
43 "Relying on UDEV_ASSUME_KERNEL_OPTS override. If it breaks, you get to
44 keep the pieces!"
45
46 --
47 Duncan - List replies preferred. No HTML msgs.
48 "Every nonfree program has a lord, a master --
49 and if you use the program, he is your master." Richard Stallman