Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 907288

Summary: optfeature.eclass: add an option to force the message to be shown unconditionally
Product: Gentoo Linux Reporter: Pacho Ramos <pacho>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: CONFIRMED ---    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Pacho Ramos gentoo-dev 2023-05-28 09:06:44 UTC
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
Comment 1 Pacho Ramos gentoo-dev 2023-05-28 10:22:01 UTC
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
Comment 2 Larry the Git Cow gentoo-dev 2023-06-24 17:44:17 UTC
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(+)