Gentoo Archives: gentoo-dev

From: Mike Gilbert <floppym@g.o>
To: Gentoo Dev <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] rfc: virtual/init for init process
Date: Fri, 27 Apr 2018 17:56:17
Message-Id: CAJ0EP4146TkewVz_rgwv=L3X_tK-=kcM6iyoO6ixtR03OP7gRA@mail.gmail.com
In Reply to: Re: [gentoo-dev] rfc: virtual/init for init process by William Hubbs
1 On Fri, Apr 27, 2018 at 1:28 PM, William Hubbs <williamh@g.o> wrote:
2 > On Fri, Apr 27, 2018 at 12:28:43PM -0400, Mike Gilbert wrote:
3 >> On Fri, Apr 27, 2018 at 11:45 AM, William Hubbs <williamh@g.o> wrote:
4 >> > On Fri, Apr 27, 2018 at 12:48:09AM -0700, Zac Medico wrote:
5 >> >> On 04/26/2018 11:34 PM, Kent Fredric wrote:
6 >> >> > On Thu, 26 Apr 2018 13:35:15 -0700
7 >> >> > Zac Medico <zmedico@g.o> wrote:
8 >> >> >
9 >> >> >> emerge --depclean, resulting in an unbootable system. Just say-in.
10 >> >> >
11 >> >> > And depclean being very verbose doesn't do many favours here either.
12 >> >> >
13 >> >> > ( I regularly do >500 package depcleans and spotting things that aren't meant to be
14 >> >> > culled amongst that list is a bit of a challenge )>
15 >> >>
16 >> >> At least for system packages, it will show a warning like the one shown
17 >> >> here:
18 >> >>
19 >> >> https://bugs.gentoo.org/642484#c0
20 >> >>
21 >> >> Hopefully that message helps those that are paying enough attention.
22 >> >> What can we do for those that overlook the warning message, other than
23 >> >> give them some rescue instructions for making their system boot again?
24 >> >
25 >> > Another option suggested to me was to add a use flag to OpenRC that
26 >> > pulls in a dependency on virtual/init instead of adding virtual/init to
27 >> > @system. The suggestion originally was to add it to rdepend, but that
28 >> > doesn't feel right to me since openrc really doesn't have a runtime
29 >> > dependency on init, so I'm thinking something like this:
30 >> >
31 >> > IUSE="... +separate-init"
32 >> >
33 >> > PDEPEND="
34 >> > ...
35 >> > separate-init? ( virtual/init )"
36 >> >
37 >> > Thoughts?
38 >>
39 >> RDEPEND and PDEPEND have essentially the same meaning when there are
40 >> no cycles in the dependency graph. The devmanual suggests that PDEPEND
41 >> should only be used to avoid cyclic dependencies.
42 >>
43 >> I don't see any reason to prefer PDEPEND over RDEPEND here, and I
44 >> don't understand why that would "feel" better. It effectively gets
45 >> treated as a runtime dependency either way.
46 >
47 > The goal of this is to find a way to accurately reflect the relationship
48 > between openrc and sysvinit in our ebuilds.
49 >
50 > The relationship between openrc and sysvinit is best described as a
51 > configurable reverse runtime dependency which we enable by default --
52 > sysvinit uses openrc to bring up the system, but openrc itself does not
53 > have a hard dependency on any init provider.
54 > It did in the past, because it called killall5, which is part of
55 > sysvinit, but that has been changed.
56 >
57 > So, the whole relationship is backward in our ebuilds. That, combined
58 > with our distro-wide ban on using use flags for optional runtime
59 > dependencies (also in the devmanual) is why I suggested this.
60
61 I have no objection to the USE flag idea. Just put the dependency in
62 RDEPEND, not PDEPEND. There is no depgraph cycle to be avoided here.