Gentoo Archives: gentoo-dev

From: Ian Stakenvicius <axs@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] linux-info.eclass: check_extra_config requires a configured kernel
Date: Fri, 04 Nov 2011 15:30:11
Message-Id: 4EB404C4.2050602@gentoo.org
In Reply to: Re: [gentoo-dev] linux-info.eclass: check_extra_config requires a configured kernel by Fabio Erculiani
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA256
3
4 On 04/11/11 11:11 AM, Fabio Erculiani wrote:
5 > On Fri, Nov 4, 2011 at 3:46 PM, Mike Gilbert <floppym@g.o> wrote:
6 >>
7 >> It is good that we warn users about this when they install the package,
8 >> but I don't think the ebuild should die.
9 >
10 > I've always found ebuilds dying at kernel config checks really annoying.
11 > Checking kernel features at build time (if we die) is broken and
12 > should be banned IMO:
13 >
14 > 1) in case of packages not needing kernel headers for building (but
15 > just checking for a feature)
16 > a) this breaks the compilation inside chroots on build servers where
17 > the goal is to just build the package (hint: binpkgs)
18 > b) it is anyway unable to reliably check if the feature is actually
19 > available or not (/proc/config.gz might be unavailable, as well as
20 > kernel sources or headers)
21
22 As i think has already been mentioned, when building binpkgs or building
23 for other systems, since the idea here is to ensure build-time
24 requirements are met, things should be OK as long as you have a
25 configured kernel for the target in place as well. And you probably
26 should; if you're building packages for target systems you might as well
27 configure and/or build their kernels too.
28
29 Also as was mentioned, /proc/config.gz would never be appropriate in
30 these cases since the running kernel probably has nothing to do with the
31 target system's kernel.
32
33 >
34 > 2) in case of packages needing kernel headers (or sources) for building
35 > a) doing the check in pkg_setup() breaks binpkgs support (the check
36 > becomes part of a build time task, and not install time)
37
38 .. so you're recommending the check be moved to pkg_preinst() ? Or
39 perhaps duplicated into both pkg_setup/pkg_pretend and pkg_preinst ?
40 That would be doable, wouldn't it?
41
42 -----BEGIN PGP SIGNATURE-----
43 Version: GnuPG v2.0.17 (GNU/Linux)
44
45 iF4EAREIAAYFAk60BMQACgkQAJxUfCtlWe17qwEAhh2udNzptIJZHeEyh8DJhTj3
46 HLbC/ZpIJUQTbpHueOEBAITcA3DasGAQIdSWGvn7E2xwYMFTS+U0UyDWJCesv5xR
47 =U+gT
48 -----END PGP SIGNATURE-----

Replies