Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 803878

Summary: emerge -av --depclean wants to remove openrc.
Product: Gentoo Linux Reporter: Alan Mackenzie <acm>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED TEST-REQUEST    
Severity: normal CC: ajak, jstein
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Alan Mackenzie 2021-07-24 18:41:24 UTC
This occurs in my openrc system with sys-process/daemontools installed.
(Note daemontools is needed for qmail (an mta) to function.)

Reproducible: Always

Steps to Reproduce:
1. emerge sys-process/daemontools.
2. emerge -av --depclean.
3. DON'T type 'y'.
Actual Results:  
One of the packages emerge proposes to remove is openrc.  A careless use of --depclean could leave a system unbootable.

Expected Results:  
--depclean leaves in place all packages required to boot a system, and also those needed for rudimentary maintenance (e.g. nano).

(Thanks to Neil Bothwick and Rich Freeman for help in tracking this bug down.)

The problem is in virtual/service-manager/service-manager-1.ebuild where virtual/daemontools appears to be deemed an equal of openrc, systemd, runit, etc.  At a guess, since daemontools is in @world, --depclean won't remove it, and removes openrc instead.

Suggestion: Packages in @system should not be removed by --depclean, unless, possibly, this is specifically requested by the user.
Comment 1 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2021-07-24 18:57:48 UTC
OpenRC is pulled into the system set via virtual/service-manager. If you install sys-process/daemontools the virtual/daemontools will be pulled in which the dependencies of virtual/service-manager. If you need OpenRC, you should add it to your world file.
Comment 2 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2021-07-24 18:58:15 UTC
(In reply to John Helmert III from comment #1)
> OpenRC is pulled into the system set via virtual/service-manager. If you
> install sys-process/daemontools the virtual/daemontools will be pulled in
> which the dependencies of virtual/service-manager.

which satisfies the dependencies of..*