Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 327701 - [Future EAPI] Recommended / suggested dependencies
Summary: [Future EAPI] Recommended / suggested dependencies
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: PMS/EAPI (show other bugs)
Hardware: All All
: Normal enhancement with 2 votes (vote)
Assignee: PMS/EAPI
: 353845 (view as bug list)
Depends on:
Blocks: future-eapi
  Show dependency tree
Reported: 2010-07-10 17:14 UTC by dE
Modified: 2023-06-02 18:47 UTC (History)
8 users (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description dE 2010-07-10 17:14:22 UTC
For e.g. we take media-sound/audacious and we have it's plugin media-plugins/audacious-dumb, but during merge of audacious, portage does not have any feature by which it can tell the user the list of enhancements that media-sound/audacious can have by merge of other packages; for e.g. in this case media-plugins/audacious-dumb is an enhancement to media-sound/audacious but currently portage has no method to tell the user that such a plugin (or enhancement) is available.

This feature can be implemented by use of USE flags, i.e for this example, we can have a use flag 'plugin-dumb' which will pull media-plugins/audacious-dumb with audacious, i.e. we are using use flags to pull in packages which are an enhancement; however I heard that this is against Gentoo ebuild policies, so this feature might be combined with Bug 319849 and we might have separate group of USE flags called 'enhancements', this will not break ebuild policies. 

However I know that if this feature is added after resolving of Bug 319849, then it will be done after 2012 but policies can be changed in days.

Take your pick. This is sort of like mimicking the --install-recommended feature of apt.

Reproducible: Always

Steps to Reproduce:
Comment 1 Zac Medico gentoo-dev 2010-07-12 06:28:26 UTC
The closest thing that you can do at this time is to produce an elog message in pkg_postinst. For example, that's the approach that I used for the suggested tarsync dependency in bug 264730.
Comment 2 dE 2010-07-12 13:04:09 UTC
The problem is, when user installs these enhancements it gets recorded into world favorite. So when you want to remove the main package --depclean returns an error and you have to remove the package manually. Cumbersome if there're lots of such plugins.
Comment 3 Zac Medico gentoo-dev 2011-02-06 17:48:11 UTC
*** Bug 353845 has been marked as a duplicate of this bug. ***
Comment 4 Steve L 2012-09-22 14:25:00 UTC
On the wiki at:
this is defined as SDEPEND. I'd like to suggest UIDEPEND (or UDEPEND), with scope for a simple label (ie UIDEPEND="recommend:cat/pkg-plugin-foo suggest:cat/pkg-plugin-bar". imo the label should be required since one should think carefully about recommending a user installs something, and it makes parsing simpler, as well as being more transparent to the reader in the case where there is only one type of suggestion.)

Since this is not required during normal dependency calculation (but rather for the user-interface to suggest addition of a new package, after the normal calculation has been done, and given that a certain package has already been selected), and there is a requirement for more than one type of suggestion, (recommended and suggested/optional were discussed before), the extra complexity seems like less of an ask: it could only get triggered when the manager is displaying to the user, if s/he actually wants that to happen. There is no requirement that the information ever be utilised, by definition.

It would also appear to make sense to allow for future new types of user-interface suggestion, and confining them to one variable also makes sense, since they are not required for standard operation, and how they are acted upon is outside the scope of PMS.
Comment 5 Ulrich Müller gentoo-dev 2023-05-20 08:56:26 UTC
Would this dependency type do more than optfeature() from optfeature.eclass does?
The only thing I can imagine is that it would record these dependencies in the VDB, but by comment #2 that wouldn't be desirable?

I suggest to close this as WONTFIX.
Comment 6 Pacho Ramos gentoo-dev 2023-05-20 11:29:13 UTC
Current eclass has some issues, for example as those in bug 892826:
- Message will not be shown at update time but, subsequent depcleaning, will end up with the package uninstalled and the admin not being aware until an hypothetical future update
- Another issue is that, maybe in 2023 a package was needed by a reverse "soft" dep, admin will install it. In the future, that package is no longer needed by that software... but the obsolete soft dep will stay installed even if not really wanted.
Comment 7 Ulrich Müller gentoo-dev 2023-05-20 11:50:21 UTC
(In reply to Pacho Ramos from comment #6)

It goes both ways. If optional dependencies aren't recorded, then there are the issues which you describe. OTOH if they are recorded, we'll have the problem mentioned in comment #2, i.e. optional deps like plugins will become hard to remove.

Not sure whether both issues could be solved at the same time.
Comment 8 Pacho Ramos gentoo-dev 2023-05-20 20:54:58 UTC
I am not sure about what system was thought originally... 

I was thinking them more like having two kinds of "world" files. 

Packages pulled in as "recommended" (I simply take the word use in Debian for this, I think RedHat/Mandriva were using something like "suggested") would be recorded in a different "world" file but in a way that they are kept there only if reverse deps are still pulling them.

Maybe they could be stored in a format like:
# parent package:suggested dependency

Then, once user removes app-office/lyx or lyx ebuild stops having that suggested dep, texlive-fontsextra would be depcleaned.

People would append lines to that "second level" world file in a similar way than "emerge --noreplace" does for regular world file:
# emerge --install-recommended app-office/lyx:dev-texlive/texlive-fontsextra

But it is only an idea... I don't know how this kind of deps are handled internally in yum or apt-get :S
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-05-21 03:42:04 UTC
You are reinventing USE flags, in a very complex, counter-intuitive and functionally limited way.
Comment 10 Pacho Ramos gentoo-dev 2023-05-21 09:37:06 UTC
Well, current USE flags are not meant to be used for that, maybe this would be covered by the runtime switchable USE flags (I think they are suggested in bug 424283). 

I am happy with that approach too. But if you close this as a duplicate of that one, I would update its summary to mention "recommended/suggested" as most people will try to search for those concepts, because they are used in other package managers. Or you can make this bug depend on the runtime USEs :/