Alan Mackenzie <a...@muc.de> wrote: > On Sun, Jul 25, 2021 at 13:26:17 +0100, Wols Lists wrote: > >> Well, it's not installed on my new system. I doubt it's installed on any >> new-ish gentoo-gnome systems. So openrc itself can't be critical. > > Must you be so objectionably pedantic? It is surely clear that I was > using "openrc" as a metasyntactic variable for "the current init > system". If it wasn't, apologies.
It is the variable for *your* current init system. Like others have systemd, runit, or daemontools as *their* current init system. Portage *cannot* know unless you tell it. The way to tell portage that a package is crucial for *you* is to put it into the world file (or into some set which is in your world file). The mistake you made is to assume that the profile profiles/default/linux/amd64/17.1/desktop (or whichever profile you use) is an openrc-specific profile. It is not: It is the generic profile for any init system. And it is a *good* thing that the basic profiles do not force an init-system upon you which you do not want to use. The systemd init system has its own profile, but only because systemd is not only an init system, and it is therefore natural to have more things in that profile than just the init system itself. One could make also openrc, runit, daemontool profiles, but this would lead to an explosion of the number of profiles (for various architectures and other variants like desktop, hardened, ...), and probably the only thing these profiles would do would be to pull in the init system itself. It is much saner to keep this in the world file. (Once it has become standard to "combine" profiles from several smaller profiles, I would suggest to have such openrc, ... profiles as well, but although this is technically possible, already, it is hardly documented and certainly cannot be considered at standard.) >> It may be critical for *your* system ... :-) > > Just as systemd is for your system. And for that reason, I have systemd in my world file. (Together with openrc, BTW, because I want to be able to toggle between init systems for the case that one is not running for whatever reason.) > If you'd installed daemontools you would also have come within > a keystroke of destroying your system Nope. > as I did, on attempting emerge --depclean. You would have received no > warning of any kind on installing the package, and there would be no > documentation brought to your attention about the potential catastrophe. Except for the warning that you should read *very carefully* through the list of packages which are going to be removed. Surprises in misconfigured systems can occur. But the problem is not the system but the misconfiguration - in your case the missing world entry. > No, my problem is caused by Gentoo allowing its package system, without > me doing anything strange Relying on openrc as a critical part of the system and not telling portage about it *is* something strange. > Nobody here has made any suggestions as to how this situation might be > prevented in the future The correct suggestion is to inform portage about your intention. Maybe add a paragraph to the handbook about doing so (as perhaps new users do no even know that they are probably using openrc). Gentoo relies on informed users, not on "fixing" things over the head of users. Your suggestion would go into the wrong direction: It means that if a user install a package which depends on daemontools, and eventually this dependency gets dropped, or the user removes the package again, portage would refuse to depclean daemontools, only because it is an alternative package satisfying a system dependency, and therefore - according to your suggestion - portage "thinks" that you *might* rely critically on it without telling portage explicitly that you do so. It is one of the big advantages of gentoo that it does not have the "system knows better than the user"-attitude. (Unfortunately, for some other packages this is not true, but let us not discuss that here.)