Files
gentoo/gui-wm
Eli Schwartz 88a930a93e gui-wm/sway: fix broken any-of dependency on systemd/basu/elogind
The src_configure of mako and other emersion software is very explicit
about how this works. There are three `if use ...; elif use ...; else`
states, and, depending on branch, one of three different dependencies
will be passed as a configure option and then linked via elf NEEDED
fields in the resulting binary.

This is true for sway as well, except that sway detects this dependency
via automagic as no src_configure arguments are passed.

It is madness to use any-of for this. There is no useful use case for
any-of (they are extremely straightforward usedeps) and furthermore it
introduces the possibility that, since basu is always a possible option,
the package could be compiled against e.g. elogind and then the elogind
package could be depcleaned if basu is installed. Since this is also
entirely automagic at src_configure time, we cannot even know *anything*
about what is installed, basically... and then binary packages leak
across systemd/openrc. Although by default, USE=tray is disabled so e.g.
the official binhost doesn't generally produce such broken binary
packages, but users building their own binaries can easily do so.

Fixing this mess is slightly involved, and comes in two parts. First,
obviously, we implement the emesonargs to select a provider without
automagic. Second, since basu is not keyworded for all arches... once
basu is actually mandatory outside of an any-of group, it becomes
evident that, since sd-bus is mandatory for the package and the only
choice is the choice of providers,

- systemd must be forced on systemd profiles
- elogind must be forced on arches that don't have basu

use.mask wins over p.use.force, so forcing both flags on x86-systemd is
not a problem. And the only way to disable both, is on profiles where
the basu dependency is available.

Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
2026-11-02 10:05:15 -05:00
..
2026-11-02 01:01:29 +00:00
2026-10-31 16:32:54 +02:00
2026-10-19 19:46:45 +03:00