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
1 This is a followup to the previous thread:
2 linux-info.eclass: lacking sources, config checks and module building
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.
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.
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.
17 Legacy:
18 - kernel sources must be present and .config must exist.
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.
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.
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 ====
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