Gentoo Archives: gentoo-dev

From: "Robin H. Johnson" <robbat2@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] linux-info: QA checks on linux_chkconfig* and further plans (1-month warning)
Date: Fri, 11 Dec 2009 21:43:04
Message-Id: 20091211214238.GC18198@orbis-terrarum.net
1 This is a followup to the previous thread:
2 linux-info.eclass: lacking sources, config checks and module building
3 http://thread.gmane.org/gmane.linux.gentoo.devel/62986
4
5 As part of the ongoing work in linux-info and cleaning up it's ebuild
6 consumers, I have added a QA check to linux_chkconfig* functions.
7 A lot of the tree has been cleaned up, but I still see new ebuilds being
8 added that need the legacy mode.
9
10 In one month, on January 10th, I plan to flip the switch between legacy
11 and non-legacy mode, and default to the new style.
12
13 If you want to use them directly in an ebuild, you MUST call one of the
14 linux_config_*exists functions prior!. Otherwise the result of the
15 linux_chkconfig* function is undefined in non-legacy mode.
16
17 Legacy:
18 - kernel sources must be present and .config must exist.
19
20 Non-legacy:
21 (available with I_KNOW_WHAT_I_AM_DOING=1 right now)
22 - .config OR /proc/config.gz must exist if you want to check
23 - any checks MUST be non-fatal, because the above files are not
24 guaranteed to exist.
25
26 If you are displaying a warning or an info block because of a specific
27 return value from linux_chkconfig, you should consider if you want to
28 display the warning/info if the state of the variable is unknown.
29 I suggest that you DO display the warning, possibly with an additional
30 line that the check was not performed.
31
32 If you just use the CONFIG_CHECK and the ERROR_<CFG>, WARNING_<CFG>
33 variables via check_extra_config, then the user is automatically
34 provided with the following warning:
35 ====
36 * Unable to check for the following kernel config options due
37 * to absence of any configured kernel sources or compiled
38 * config:
39 * - (option)
40 ...
41 * You're on your own to make sure they are set if needed.
42 ====
43
44 --
45 Robin Hugh Johnson
46 Gentoo Linux: Developer, Trustee & Infrastructure Lead
47 E-Mail : robbat2@g.o
48 GnuPG FP : 11AC BA4F 4778 E3F6 E4ED F38E B27B 944E 3488 4E85