As currently we have no other method for suggested dependencies (bug 327701, bug 424283), we need a way to prevent users from unexpectedly uninstalling a wanted runtime optional dependency that was installed but, due to the migration, stops to be directly pulled in via DEPEND/RDEPEND. Currently, it is possible that, when migrating from an unconditional dep or USE dep to optfeature.eclass, the optional package will end up uninstalled. That is caused by that optional dep being present in the system while updating (and, hence, optfeature.eclass not logging anything, neither informing the user in any way), but, just after, being depcleaned. User won't know about that optional dep until a future version bump is installed in the future. One possible workaround could be to have a "FORCE_PRINT" variable (I don't care much about the final naming) that would allow us to print the informative message when migrating from an older version (via has_version usage). This would help on cases like media-plugins/alsa-plugins[pulseaudio] and pipewire (bug 892826), dev-texlive/texlive-fontsextra and lyx or gnome-extra/gnome-browser-connector and gnome-shell, for example. Thanks a lot
Well... other option would be to show the warning when the optional package is not in the world file... but I am not sure about how to access to that information from the eclass :/ In that case we wouldn't need to FORCE_PRINT workaround as the message would be shown. That would also avoid the potential issue of a different package pulling the optional dep, message not being shown because of that, but future removal of that package causing the optional dep to be depcleaned too
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7123582933445c4c4b9b9854652eb96793bb0e8 commit c7123582933445c4c4b9b9854652eb96793bb0e8 Author: Pacho Ramos <pacho@gentoo.org> AuthorDate: 2023-06-24 17:18:32 +0000 Commit: Pacho Ramos <pacho@gentoo.org> CommitDate: 2023-06-24 17:18:32 +0000 app-office/lyx: Warn people upgrading from stable about new optional dep Otherwise they will likely get the dep depcleaned and start seeing some files failing to compile due to missing fonts. Bug: https://bugs.gentoo.org/907288 Signed-off-by: Pacho Ramos <pacho@gentoo.org> app-office/lyx/lyx-2.3.7.ebuild | 9 +++++++++ 1 file changed, 9 insertions(+)