Gentoo Archives: gentoo-dev

From: Mike Pagano <mpagano@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Guidance on adding kernel config checks to ebuilds
Date: Mon, 27 Sep 2021 18:17:47
Message-Id: 3f9fbaa2-f819-b3cc-fa9b-eb6643dbc22a@gentoo.org
In Reply to: Re: [gentoo-dev] Guidance on adding kernel config checks to ebuilds by Mike Gilbert
1 On 9/27/21 2:15 PM, Mike Gilbert wrote:
2 > On Mon, Sep 27, 2021 at 1:44 PM Robin H. Johnson <robbat2@g.o> wrote:
3 >>
4 >> On Mon, Sep 27, 2021 at 01:15:10PM -0400, Mike Gilbert wrote:
5 >>> On Mon, Sep 27, 2021 at 12:23 PM Mike Pagano <mpagano@g.o> wrote:
6 >>>>> Adding linux-info calls to pkg_pretend or pkg_setup causes slowdowns
7 >>>>> when running emerge, so we should do so only when there is a
8 >>>>> compensating benefit.
9 >>>>
10 >>>> Is this a significant slowdown? Do you have any numbers?
11 >>>
12 >>> Adding a check for CONFIG_PACKET to the dhcpcd ebuild adds around 7
13 >>> seconds of delay time to the pkg_setup and/or pkg_pretend phase on my
14 >>> system.
15 >>>
16 >>> That's ok if a small number of packages are doing it, but it would
17 >>> become quite annoying if a significant number of them get queued up.
18 >> 7 seconds is ridiculous.
19 >
20 > I think the horribly slow performance is mainly due to this change in
21 > how we detect the kernel version:
22 >
23 > https://gitweb.gentoo.org/repo/gentoo.git/commit/eclass/linux-info.eclass?id=d1ea596f034285cd044006b107a60902ea059793
24 >
25 > That causes "make" to be called 4 times, and each make invocation adds
26 > a couple of seconds to the get_version call.
27 >
28
29 Changes to these eclasses are like a prison of circular breakage for which there is no escape.