Gentoo Archives: gentoo-dev

From: Ionen Wolkens <sudinave@×××××.com>
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:55:52
Message-Id: YLPfsdtbhUYdCDM/@eversor
In Reply to: Re: [gentoo-dev] [PATCH] Create default implementation of pkg_pretend, move CONFIG_CHECK by Mike
1 On Sun, May 30, 2021 at 02:42:01PM -0400, Mike wrote:
2 >
3 >
4 > On 5/30/21 2:28 PM, Ionen Wolkens wrote:
5 > > On Sun, May 30, 2021 at 01:29:12PM -0400, mpagano@g.o wrote:
6 > >> From: Mike Pagano <mpagano@g.o>
7 > >>
8 > >> As the purpose of pkg_pretend is to run sanity checks during
9 > >> dependency calculation time, provide the default implementation
10 > >> and perform CONFIG_CHECK within it.
11 > >>
12 > >> See bug #759238
13 > >>
14 > > [...]
15 > >>
16 > >> +# @FUNCTION: linux-mod_pkg_pretend
17 > >> +# @DESCRIPTION:
18 > >> +# Check the CONFIG_CHECK options
19 > >> +linux-mod_pkg_pretend() {
20 > >> +
21 > >> + debug-print-function ${FUNCNAME} $*
22 > >> + # External modules use kernel symbols (bug #591832, #759238)
23 > >> + CONFIG_CHECK+=" !TRIM_UNUSED_KSYMS"
24 > >> +}
25 > >
26 > > Is this not supposed to actually run the checks? Correct me if I'm
27 > > missing something but it's just setting the value. linux-mod normally
28 > > run the checks through linux-info_pkg_setup and its check_extra_config.
29 >
30 > Thanks for the analysis, Ionen.
31 > The eclass does not actually run the check as it exists today.
32 > Maybe there was a reason for that when it was originally coded?
33
34 It does indirectly:
35 # External modules use kernel symbols (bug #591832)
36 CONFIG_CHECK+=" !TRIM_UNUSED_KSYMS"
37
38 linux-info_pkg_setup;
39 ^^^^^ checks ran here
40
41 Older nvidia-drivers ebuild was kind of nasty with that, it did its
42 own checks then the linux-mod.eclass' linux-info call did as well
43 (duplicate messages), which I now let linux-mod handle.
44
45 >
46 >
47 > > For nvidia-drivers, this value will also be lost for the pkg_setup test
48 > > (needed to check, say.. gentoo-kernel emerged in-between) because I
49 > > currently set a local CONFIG_CHECK="..." inside pkg_setup()
50 > > (there's also a conditional CONFIG_CHECK, part of why not global)
51 > >
52 > > Some other ebuilds set CONFIG_CHECK in pkg_setup I believe.
53 >
54 > Maybe virtualbox-modules should do it's own CONFIG_CHECK as nvidia-drivers does.
55 > As that package is the impetus of this patch.
56 >
57 > > Not that I can't change this for nvidia, I guess I could set a global
58 > > scope CONFIG_CHECK with !FATAL-only and += the non-fatal ones in
59 > > pkg_setup to avoid message duplication.
60 > >
61 > > Have same concerns as mgorny wrt exported pkg_pretend, plus I'd also
62 > > need to add my own pkg_pretend wrapper to check MODULES_OPTIONAL_USE
63 > >
64 >
65
66 --
67 ionen

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies