As discussed in https://bugs.freedesktop.org/show_bug.cgi?id=53905 a user can not have her GNOME desktop running correctly with some parts of the stack using systemd for session tracking support, and the others using consolekit. Moreover, if the user has the systemd USE-flag, but is using OpenRC as init system, then her systemd will not work. If the user is using systemd as init, then she should set her USE-flags to USE="systemd -consolekit" (except for perhaps bluez: #436180). If the user is using OpenRC as init, then she should set her USE-flags to USE="consolekit -systemd". It is not possible to just switch from one init to the other while running GNOME: the stack for the desktop environment should be recompiled each time accordingly. I recommend that a warning should be shown when installing >=gnome-base/gnome-3.4 if both USE-flags are enabled, and another one should be shown always, stating that GNOME can only run correctly with the full stack using systemd, or with it completely disabled. Reproducible: Always
Counterexample: gnome-base/gdm with USE="consolekit systemd" is a reasonable configuration. With those flags, the gdm daemon should do the correct thing at runtime: it will register with systemd if the machine was booted with systemd, and if not, it will register with consolekit. Users who are experimenting with init systems can emerge gdm with USE="consolekit systemd" to avoid recompilation when switching between systemd and openrc. If it does not make sense for some ebuild to have USE="consolekit systemd", then that particular ebuild should probably set REQUIRED_USE="^^ ( consolekit systemd )" if exactly one of the flags must be set; or REQUIRED_USE="consolekit? ( !systemd) systemd? ( !consolekit )" if zero or one of the flags must be set.
(In reply to comment #1) > Counterexample: gnome-base/gdm with USE="consolekit systemd" is a reasonable > configuration. With those flags, the gdm daemon should do the correct thing > at runtime: it will register with systemd if the machine was booted with > systemd, and if not, it will register with consolekit. Users who are > experimenting with init systems can emerge gdm with USE="consolekit systemd" > to avoid recompilation when switching between systemd and openrc. > > If it does not make sense for some ebuild to have USE="consolekit systemd", > then that particular ebuild should probably set > > REQUIRED_USE="^^ ( consolekit systemd )" > if exactly one of the flags must be set; or > > REQUIRED_USE="consolekit? ( !systemd) systemd? ( !consolekit )" > if zero or one of the flags must be set. I'm not familiar enough with the code of gdm, but I suppose it works in that case. However, when I compiled gnome-shell, gnome-session, and polkit without systemd support, and gdm with systemd support, then the bug I reported in fd.org showed up. Another case: polkit. It has two implementations for PolkitUnixSession, one uses consolekit (src/polkit/polkitunixsession.c), and another one uses systemd (src/polkit/polkitunixsession-systemd.c). Only one can be active at runtime, and actually the both share the same header file (both are GObjects). Polkit maintainers will keep support for the consolekit implementation, but I seriously doubt that they will do the effort to implement runtime interchangeable support for both. They see systemd as the future (and certainly, consolekit has no active development). I agree with the REQUIRED_USE="consolekit? ( !systemd) systemd? ( !consolekit )" solution for polkit ebuild.
Thanks for systemd-love improvements, this is no longer the case with 3.8