From: Mike Pagano <[email protected]> As the purpose of pkg_pretend is to run sanity checks during dependency calculation time, provide the default implementation and perform CONFIG_CHECK within it.
See bug #759238 Signed-off-by: Mike Pagano <[email protected]> --- eclass/linux-mod.eclass | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass index 11b0fd0cf..42e541ed1 100644 --- a/eclass/linux-mod.eclass +++ b/eclass/linux-mod.eclass @@ -135,7 +135,7 @@ # It's a read-only variable. It contains the extension of the kernel modules. inherit eutils linux-info multilib toolchain-funcs -EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_postinst src_install src_compile pkg_postrm +EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_pretend pkg_postinst src_install src_compile pkg_postrm case ${MODULES_OPTIONAL_USE_IUSE_DEFAULT:-n} in [nNfF]*|[oO][fF]*|0|-) _modules_optional_use_iuse_default='' ;; @@ -157,7 +157,7 @@ RDEPEND=" ) ${MODULES_OPTIONAL_USE:+)}" DEPEND="${RDEPEND} - ${MODULES_OPTIONAL_USE}${MODULES_OPTIONAL_USE:+? (} + ${MODULES_OPTIONAL_USE}${MODULES_OPTIONAL_USE:+? (} sys-apps/sed kernel_linux? ( virtual/linux-sources virtual/libelf ) ${MODULES_OPTIONAL_USE:+)}" @@ -567,6 +567,16 @@ find_module_params() { # default ebuild functions # -------------------------------- +# @FUNCTION: linux-mod_pkg_pretend +# @DESCRIPTION: +# Check the CONFIG_CHECK options +linux-mod_pkg_pretend() { + + debug-print-function ${FUNCNAME} $* + # External modules use kernel symbols (bug #591832, #759238) + CONFIG_CHECK+=" !TRIM_UNUSED_KSYMS" +} + # @FUNCTION: linux-mod_pkg_setup # @DESCRIPTION: # It checks the CONFIG_CHECK options (see linux-info.eclass(5)), verifies that the kernel is @@ -589,9 +599,6 @@ linux-mod_pkg_setup() { return fi - # External modules use kernel symbols (bug #591832) - CONFIG_CHECK+=" !TRIM_UNUSED_KSYMS" - linux-info_pkg_setup; require_configured_kernel check_kernel_built; -- 2.31.1
