[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-dev
Subject:    Re: [gentoo-dev] [PATCH] Create default implementation of pkg_pretend, move CONFIG_CHECK
From:       Mike <mpagano () gentoo ! org>
Date:       2021-05-30 19:07:55
Message-ID: 73897765-7fa8-9b06-be81-d0a244c770ce () gentoo ! org
[Download RAW message or body]



On 5/30/21 2:55 PM, Ionen Wolkens wrote:
> On Sun, May 30, 2021 at 02:42:01PM -0400, Mike wrote:
>>
>>
>> On 5/30/21 2:28 PM, Ionen Wolkens wrote:
>>> On Sun, May 30, 2021 at 01:29:12PM -0400, mpagano@gentoo.org wrote:
>>>> From: Mike Pagano <mpagano@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? 
> 
> It does indirectly:
>     # External modules use kernel symbols (bug #591832)
>     CONFIG_CHECK+=" !TRIM_UNUSED_KSYMS"
> 
>     linux-info_pkg_setup;
>     ^^^^^ checks ran here
> 
> Older nvidia-drivers ebuild was kind of nasty with that, it did its
> own checks then the linux-mod.eclass' linux-info call did as well
> (duplicate messages), which I now let linux-mod handle.
> 
>>
>>  
>>> 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
>>>
>>
> 

Going to rescind this patch from consideration.  

Mike

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic