Following dependency was added to media-libs/libpulse-16.1 compared to previous version 16.0:
This causes to pull in either of the sound servers unconditionally. It is however not necessary to have a sound server in setups using media-sound/apulse.
It would make sense to control the dependency with daemon and sound-server use flags which would be in line with other PulseAudio and PipeWire ebuilds.
--- libpulse-16.1.ebuild 2022-08-29 07:27:33.318867057 +0200
+++ libpulse-16.1-r1.ebuild 2022-08-29 07:35:52.827721630 +0200
@@ -24,7 +24,7 @@
-IUSE="+asyncns dbus doc +glib gtk selinux systemd test valgrind X"
+IUSE="+asyncns daemon dbus doc +glib gtk selinux sound-server systemd test valgrind X"
RESTRICT="!test? ( test )"
# NOTE: libpcre needed in some cases, bug #472228
@@ -68,10 +68,12 @@
doc? ( app-doc/doxygen )
- || (
+ sound-server? ( media-video/pipewire[sound-server(+)] )
+ daemon? (
+ || (
We want to guarantee a working setup, so someone needs to do the work in apulse packaging to tie into all this, so it could be an option within the || deps or something.
Yes, adding apulse to the PDEPEND is also a suitable solution. No changes to apulse packaging are necessary.
In general, I am not sure that in the Gentoo world, which promotes flexibility and control over the system configuration, it is wise to try to guarantee something. These are conflicting requirements. Instead, providing sane defaults (enable corresponding USE flags) which leads to a working setup is the right thing to do. But if user explicitly says -sound-server and 'media-sound/pulseaudio -daemon' then such configuration should be respected if technically possible. Perhaps give a warning at most.
I believe adding this dependency might work though I never tried it myself.
On the other hand, media-sound/apulse[sdk] looks like a better alternative to media-libs/libpulse for apulse use case at higher dependency level. At least this way parts that will not work with apulse (e.g. pactl.) will not be installed too, reducing confusion a bit.