Zbigniew Jędrzejewski-Szmek [2016-07-04 22:20 +0000]: > I think we should instead enhance target units to provide missing > functionality. The most important thing would be to have something > like PartOf, but more nicely configured. PartOf=graphical-kde.target > would do the trick, but it would need to be configured in each > unit separately, which would mean that we'd need to duplicate each > unit for each target, which is unacceptable. I don't see a nice > way to achieve this with the current set of options. What about > adding DependenciesPartOf=yes|no on the target unit, with "yes" > meaning that we automatically add PartOf= dependencies to any service > which has a Wants= or Requires= dependency to the target.
This would still not be sufficient, AFAICS. The top-level targets will only have relatively few direct dependencies. Let's suppose gnome-session.target has "Requires=mutter.service gnome-settings-daemon.service" and mutter.service then has a "Wants=at-spi2.service". We still want to stop at-spi2.service together with the session. DependenciesPartOf=yes in gnome.target would not achieve that (or it would need to apply transitively, and to Wants= as well, which sounds quite strange). OTOH adding "PartOf=graphical-session.target" to all graphical session specific user services works fine and works with the existing systemd model and dependencies. Martin -- Martin Pitt | http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel