GLEP 42 Display-If-Profile does not work when /etc/portage/make.profile is a directory with "parent" file referring to used profile(s). (I.e. /etc/portage/make.profile is not a symbolic link.)
In LocationsManager.py, we can an attribute to _profile_node which refers to the the path relative to the containing repo. Then, in news.py, we can access those attributes via settings._locations_manager.profiles_complex and match them all against the the Display-If-Profile path.
There's been a ton of news items with Display-If-Profile in the last few years and make.profile has been a symlink on most systems for as long as I can remember. In that time, this bug hasn't come up. Is it fixed?
Thanks to a forum post I just realized that I didn't get notified about 2023-05-20-kde-pipewire-wayland. I have my own set of profiles that I use, which inherit from default/linux/amd64/17.1/desktop/plasma/systemd. /etc/portage/make.profile is a symlink into an overlay. So it seems that Display-If-Profile might not work as expected with users' custom profiles in general. It would be really great if we could check the closure of all profiles as Zac suggests.
Yeah, that sounds reasonable to me, although I'd need to check if the GLEP allows us to have that behaviour or if we need to amend it. Patches welcome if interested.
Sure, I can take a look at this.