Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 365543 - linux-{mod,info}.eclass should checks in the pkg_pretend phase
Summary: linux-{mod,info}.eclass should checks in the pkg_pretend phase
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-01 12:16 UTC by Enrico Tagliavini
Modified: 2023-01-29 20:34 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Enrico Tagliavini 2011-05-01 12:16:11 UTC
Actually linux-{mod,info} eclasses check the kernel during the pkg_setup phase. It would be better if the check is moved to pkg_pretend function, so the user is warned an incorrect kernel config is present just after the emerge command is started and not later during the package build phase.

To do an example: i'm the proxy mantainer of ati-drivers and currently i'm doing this:

pkg_pretend() {
	if use modules; then
		linux-info_pkg_setup
		require_configured_kernel
		_check_kernel_config
	fi
}

pkg_setup() {
	if use modules; then
		MODULE_NAMES="fglrx(video:${S}/${FOLDER_PREFIX}/lib/modules/fglrx/build_mod/2.6.x)"
		BUILD_TARGETS="kmod_build"
		linux-mod_pkg_setup

As you can see i call linux-info_pkg_setup ; require_configured_kernel, to do the check, but then calling linux-mod_pkg_setup i will do it again. The optimal setup would be to call a linux-mod_pkg_pretend in the pretend phase which does only the check (a linux-info_pkg_pretend is likely needed too), and a linux-mod_pkg_setup with checks stripped out.

Likely the best solution is to bump linux-{mod,info} to linux-{mod,info}-2 so the actual behaviour is not broken in current ebuilds.

Reproducible: Always
Comment 1 Mike Pagano gentoo-dev 2021-09-08 16:48:01 UTC
Could you not call check_extra_config in the ebuild pkg_pretend ?