A lot of ebuilds check the current kernel config if it is missing some options that are required for the package. ie using linux-info.eclass check_extra_config.
Once the package is installed, there is no way to re-check all the options. On my server I generally rebuild the kernel infrequently and have forgotten if there are any recommended or required options by the time I do it next. Also There is no way to make sure I have not accidentally removed an option.
There should be an emaint kconfigcheck or similar tool that will check that a kernel is configured properly and list all the options that are missing.
I've noticed that some ebuilds set the CONFIG_CHECK variable in pkg_pretend, and use conditional logic there. For example, xf86-video-ati/xf86-video-ati-7.5.0 does this:
if use kernel_linux ; then
if kernel_is -ge 3 9; then
We could have PMS specify a standard method for a package manager to obtain this information from the ebuild.
Maybe we should have a way for linux-info.eclass to install the requested kernel settings in a file inside a /etc/kernel-config.d directory. Maybe it doesn't need to involve PMS?
Considering that we have a doenvd function, maybe a dokernconfd helper makes sense?
(In reply to Zac Medico from comment #2)
> Maybe we should have a way for linux-info.eclass to install the requested
> kernel settings in a file inside a /etc/kernel-config.d directory. Maybe it
> doesn't need to involve PMS?
I was originally thinking something like this. Usually the tests involve the type of videocard or something which wont change, things like kernel_is -ge 3 9 makes this a lot more complicated. Another problem is if a new kernel comes out which changes a kconfig option, the files in /etc/kernel-config.d would not be updated without a revbump and a revbump would be unneccesary since the new kernel options do not affect the running machine at all.
Or perhaps we can change check_extra_config and then just call only the pkg_setup phase on packages that inherit linux-info. The problem is that some packages do it in pkg_setup() and some in pkg_pretend(). Kind of ugly but would be update-able easily when new kernels change options (such at the ati one above).
I'm using this script for that purpose:
Should we get that into gentoolkit? Maybe call it ekcc (e-kernel-config-check)?
*** Bug 705806 has been marked as a duplicate of this bug. ***