Gentoo Archives: gentoo-dev

From: Ionen Wolkens <ionen@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] linux-mod - moving checks to pkg_pretend
Date: Fri, 10 Jun 2022 10:07:52
Message-Id: YqMX8HBf/2gROpAC@eversor
In Reply to: Re: [gentoo-dev] linux-mod - moving checks to pkg_pretend by Ionen Wolkens
1 On Fri, Jun 10, 2022 at 06:03:28AM -0400, Ionen Wolkens wrote:
2 > On Fri, Jun 10, 2022 at 11:41:01AM +0200, Jaco Kroon wrote:
3 > > Hi All,
4 > >
5 > > Currently checks for kernel options etc happen in pkg_setup, would it be
6 > > possible to move this to pkg_pretend?
7 >
8 > One problem with pkg_pretend is that it may not even be the right
9 > kernel, e.g. it could be using a new gentoo-kernel that was just
10 > emerged in the process. There's also USE=symlink which may lead
11 > to an entirely non-configured kernel. So pkg_setup check is
12 > essential and "moving" wouldn't be right.
13 >
14 > Copying can "somewhat" work, albeit it could check against different
15 > kernels and also cause duplicated messages (former nvidia-drivers
16
17 Actually, also need to consider the case where there's not even
18 a kernel yet.
19
20 e.g. `emerge gentoo-kernel-bin nvidia-drivers` would fail with
21 pkg_pretend and work with pkg_setup
22
23 So, if used, pretend would need to be (at least) non-fatal and
24 just a warning.
25
26 > ebuild used to even repeat messages /3/ times when some were fine
27 > to ignore (aka, just a warning) -- but 3 rather than 2 was due to
28 > the ebuild doing it wrong though).
29 >
30 > >
31 > > Motivation:  pkg_setup executes just prior to unpack, so if it fails
32 > > here it could be after a lot of other work has already gone into other
33 > > packages, breaking the full merge, it would thus be better to break early.
34 > >
35 > > A couple of packages (dahdi included, although, in-prep commit changes
36 > > that to match the eclass) invoke special cases for CHECK_CONFIG,
37 > > depending on USE flags, so for example this is going into dahdi now
38 > > (variation of what was in pkg_pretend)
39 > >
40 > > use oslec && CHECK_CONFIG+=" ECHO"
41 > > linux-mod_pkg_setup
42 > >
43 > > Most of the checks in linux-mod_pkg_setup (like ensuring kernel sources
44 > > are prepped) makes sense to perform in pretend rather so that we know
45 > > it's sorted prior to the first packages starting to merge, thus reducing
46 > > risk of breakage once merges have initiated.
47 > >
48 > > There are a fair number of consumers in-tree that would need to be
49 > > validated, but from a quick grep I did this morning looking for examples
50 > > I *suspect* most of the consumers will not require any changes.
51 >
52 > Ideally changing EXPORT_FUNCTIONS should be done on EAPI bumps rather
53 > than trying to update every ebuilds. Lot of overlays use linux-mod
54 > too and don't expect sudden API breakage assuming not using the eclass
55 > in a way they weren't supposed to.
56 >
57 > >
58 > > If there are no objections, and time permitting, I could take a shot at
59 > > this and file a PR.
60 > >
61 > > Kind Regards,
62 > > Jaco
63 > >
64 > >
65 >
66 > --
67 > ionen
68
69
70
71 --
72 ionen

Attachments

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

Replies

Subject Author
Re: [gentoo-dev] linux-mod - moving checks to pkg_pretend Jaco Kroon <jaco@××××××.za>