Gentoo Archives: gentoo-dev

From: Mike <mpagano@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH] Create default implementation of pkg_pretend, move CONFIG_CHECK
Date: Sun, 30 May 2021 18:42:08
Message-Id: 425698eb-d2f7-c436-33a7-cd31c9a94ecd@gentoo.org
In Reply to: Re: [gentoo-dev] [PATCH] Create default implementation of pkg_pretend, move CONFIG_CHECK by Ionen Wolkens
1 On 5/30/21 2:28 PM, Ionen Wolkens wrote:
2 > On Sun, May 30, 2021 at 01:29:12PM -0400, mpagano@g.o wrote:
3 >> From: Mike Pagano <mpagano@g.o>
4 >>
5 >> As the purpose of pkg_pretend is to run sanity checks during
6 >> dependency calculation time, provide the default implementation
7 >> and perform CONFIG_CHECK within it.
8 >>
9 >> See bug #759238
10 >>
11 > [...]
12 >>
13 >> +# @FUNCTION: linux-mod_pkg_pretend
14 >> +# @DESCRIPTION:
15 >> +# Check the CONFIG_CHECK options
16 >> +linux-mod_pkg_pretend() {
17 >> +
18 >> + debug-print-function ${FUNCNAME} $*
19 >> + # External modules use kernel symbols (bug #591832, #759238)
20 >> + CONFIG_CHECK+=" !TRIM_UNUSED_KSYMS"
21 >> +}
22 >
23 > Is this not supposed to actually run the checks? Correct me if I'm
24 > missing something but it's just setting the value. linux-mod normally
25 > run the checks through linux-info_pkg_setup and its check_extra_config.
26
27 Thanks for the analysis, Ionen.
28 The eclass does not actually run the check as it exists today.
29 Maybe there was a reason for that when it was originally coded?
30
31
32 > For nvidia-drivers, this value will also be lost for the pkg_setup test
33 > (needed to check, say.. gentoo-kernel emerged in-between) because I
34 > currently set a local CONFIG_CHECK="..." inside pkg_setup()
35 > (there's also a conditional CONFIG_CHECK, part of why not global)
36 >
37 > Some other ebuilds set CONFIG_CHECK in pkg_setup I believe.
38
39 Maybe virtualbox-modules should do it's own CONFIG_CHECK as nvidia-drivers does.
40 As that package is the impetus of this patch.
41
42 > Not that I can't change this for nvidia, I guess I could set a global
43 > scope CONFIG_CHECK with !FATAL-only and += the non-fatal ones in
44 > pkg_setup to avoid message duplication.
45 >
46 > Have same concerns as mgorny wrt exported pkg_pretend, plus I'd also
47 > need to add my own pkg_pretend wrapper to check MODULES_OPTIONAL_USE
48 >
49
50 --
51 Mike Pagano
52 Gentoo Developer - Kernel Project
53 Gentoo Sources - Lead
54 E-Mail : mpagano@g.o
55 GnuPG FP : 52CC A0B0 F631 0B17 0142 F83F 92A6 DBEC 81F2 B137
56 Public Key : http://http://pgp.mit.edu/pks/lookup?search=0x92A6DBEC81F2B137&op=index

Replies