This is a followup to the previous thread:
linux-info.eclass: lacking sources, config checks and module building
http://thread.gmane.org/gmane.linux.gentoo.devel/62986

As part of the ongoing work in linux-info and cleaning up it's ebuild
consumers, I have added a QA check to linux_chkconfig* functions.
A lot of the tree has been cleaned up, but I still see new ebuilds being
added that need the legacy mode.

In one month, on January 10th, I plan to flip the switch between legacy
and non-legacy mode, and default to the new style.

If you want to use them directly in an ebuild, you MUST call one of the
linux_config_*exists functions prior!. Otherwise the result of the
linux_chkconfig* function is undefined in non-legacy mode.

Legacy:
- kernel sources must be present and .config must exist.

Non-legacy:
(available with I_KNOW_WHAT_I_AM_DOING=1 right now)
- .config OR /proc/config.gz must exist if you want to check
- any checks MUST be non-fatal, because the above files are not
  guaranteed to exist.

If you are displaying a warning or an info block because of a specific
return value from linux_chkconfig, you should consider if you want to
display the warning/info if the state of the variable is unknown.
I suggest that you DO display the warning, possibly with an additional
line that the check was not performed.

If you just use the CONFIG_CHECK and the ERROR_<CFG>, WARNING_<CFG>
variables via check_extra_config, then the user is automatically
provided with the following warning:
====
* Unable to check for the following kernel config options due
* to absence of any configured kernel sources or compiled
* config:
* - (option)
...
* You're on your own to make sure they are set if needed.
====

-- 
Robin Hugh Johnson
Gentoo Linux: Developer, Trustee & Infrastructure Lead
E-Mail     : robb...@gentoo.org
GnuPG FP   : 11AC BA4F 4778 E3F6 E4ED  F38E B27B 944E 3488 4E85

Attachment: pgpfxw7UXFFzO.pgp
Description: PGP signature

Reply via email to