On 5/30/21 2:28 PM, Ionen Wolkens wrote:
> On Sun, May 30, 2021 at 01:29:12PM -0400, mpag...@gentoo.org wrote:
>> From: Mike Pagano <mpag...@gentoo.org>
>>
>> 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
>>
> [...]
>>  
>> +# @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"
>> +}
> 
> Is this not supposed to actually run the checks? Correct me if I'm
> missing something but it's just setting the value. linux-mod normally
> run the checks through linux-info_pkg_setup and its check_extra_config.

Thanks for the analysis, Ionen.
The eclass does not actually run the check as it exists today.
Maybe there was a reason for that when it was originally coded? 

 
> For nvidia-drivers, this value will also be lost for the pkg_setup test
> (needed to check, say.. gentoo-kernel emerged in-between) because I 
> currently set a local CONFIG_CHECK="..." inside pkg_setup()
> (there's also a conditional CONFIG_CHECK, part of why not global)
> 
> Some other ebuilds set CONFIG_CHECK in pkg_setup I believe.

Maybe virtualbox-modules should do it's own CONFIG_CHECK as nvidia-drivers does.
As that package is the impetus of this patch.

> Not that I can't change this for nvidia, I guess I could set a global
> scope CONFIG_CHECK with !FATAL-only and += the non-fatal ones in
> pkg_setup to avoid message duplication.
> 
> Have same concerns as mgorny wrt exported pkg_pretend, plus I'd also
> need to add my own pkg_pretend wrapper to check MODULES_OPTIONAL_USE
> 

-- 
Mike Pagano
Gentoo Developer - Kernel Project
Gentoo Sources - Lead 
E-Mail     : mpag...@gentoo.org
GnuPG FP   : 52CC A0B0 F631 0B17 0142 F83F 92A6 DBEC 81F2 B137
Public Key : 
http://http://pgp.mit.edu/pks/lookup?search=0x92A6DBEC81F2B137&op=index

Reply via email to