Gentoo Archives: gentoo-user

From: Rich Freeman <rich0@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Inter-package dependencies.
Date: Thu, 20 Jun 2019 13:14:51
Message-Id: CAGfcS_mZRE+U3R4zKbBYGMtfk51dfBEHC47Thmbs4xyvOCnhLg@mail.gmail.com
In Reply to: Re: [gentoo-user] Inter-package dependencies. by "aleiphoenix ."
1 On Thu, Jun 20, 2019 at 1:34 AM aleiphoenix . <aleiphoenix@×××××.com> wrote:
2 >
3 > On Thu, Jun 20, 2019 at 1:30 PM aleiphoenix . <aleiphoenix@×××××.com> wrote:
4 > > See some ebuilds like x11-drivers/nvidia-drivers/nvidia-drivers-430.14.ebuild
5 > >
6 > > if use kernel_linux && kernel_is ge 5 2; then
7 > > ewarn "Gentoo supports kernels which are supported by NVIDIA"
8 > > ewarn "which are limited to the following kernels:"
9 > > ewarn "<sys-kernel/gentoo-sources-5.2"
10 > > ewarn "<sys-kernel/vanilla-sources-5.2"
11 > > ewarn ""
12 > > ewarn "You are free to utilize epatch_user to provide whatever"
13 > > ewarn "support you feel is appropriate, but will not receive"
14 > > ewarn "support as a result of those changes."
15 > > ewarn ""
16 > > ewarn "Do not file a bug report about this."
17 > > ewarn ""
18 > > fi
19 > >
20 > > You could die there :)
21 >
22 > Sorry about the typo, I mean you could use "die" there.
23 >
24
25 This will block installing the package if the kernel is invalid, but
26 will not block installing an invalid kernel later. Also, this needs
27 to be done in an appropriate phase.
28
29 You probably want to use a blocker for something like this, though
30 portage doesn't always handle these well, and kernels are also a bit
31 different as packages go. A blocker is just a dependency with an !
32 operator. Note that this blocks installing that kernel package, not
33 running that kernel, which is why kernel dependences tend to be
34 expressed differently.
35
36 Personally, in situations where I'm very dependent on kernel series I
37 just run upstream kernels. Gentoo barely patches its kernels so
38 unless you REALLY need the gentoo patches it is pretty trivial to just
39 sync from the stable repo and pull the appropriate branch for a
40 longterm series. I do this for zfs, and have done it in the past for
41 btrfs, and would do this anytime I needed to pin a particular kernel
42 series. You would lose the benefit of any Gentoo QA, but IMO that
43 benefits you mainly to the degree that you run typical packages, and
44 you're already deviating from the script.
45
46 If your package is in-tree and depends on kernel version you could
47 file a bug to address this in some way. If it is in an overlay then
48 you're on your own.
49
50
51 --
52 Rich