On Mon, Aug 23, 2021 at 10:46 AM David Seifert <s...@gentoo.org> wrote: > > Let assume the counterfactual for a moment here: We retained the > USE=systemd flag for all unit files and what not, so people can cleanse > themselves of the systemd units etc. without resorting to INSTALL_MASK. > > How would USE=-systemd have prevented this situation? USE=-systemd would > randomly mv and sed random files so the "systemd-" prefix doesn't show > up?
So, I think using USE=systemd to control installing units is a bad idea, for the same reason that it is a bad idea for controlling init.d scripts. It results in users having to rebuild half their system just to get those files installed if they later need them. However, the argument would be that if we had used USE=systemd to control installing units, then users wouldn't set an INSTALL_MASK, and thus when udev comes along it would still install everything just fine. I doubt we'd have it rename anything - the systemd- prefix would still apply, but since there are no INSTALL_MASKs then it wouldn't cause any issues. The issue isn't systemd in the filenames/paths, but users attempts to keep things from being installed with those names/paths. I'm not sure what exactly udev installs, but obviously install masks might or might not cause harm depending on how specific they are. If they are just for "*systemd*" then that would be pretty likely to clobber important stuff. If it is just targeting systemd units in /etc/systemd/system then that seems pretty unlikely to harm anything if you aren't running systemd as your service manager. I notice systemd installs udev to /lib/systemd/systemd-udevd and that would be probably the path most likely to cause issues. Most of the rules are under /lib/udev and so on, and there are things in the generic lib directories. However, I'm using systemd and not the standalone udev ebuild - it might do some things differently. IMO if users really just want to get rid of unit files they're probably better off masking /etc/systemd/system and /lib/systemd/system. Most of the other stuff in that path is installed by systemd itself, which users won't have if they're not using it. I get that there are a lot of strong opinions in this area, but the issues that can arise probably aren't worth the fuss except in very extreme situations where every inode counts/etc. -- Rich