On Mon, 2022-05-30 at 16:25 +0200, Dominique Leuenberger / DimStar wrote:
On Mon, 2022-05-30 at 16:06 +0200, Martin Wilck wrote:
IMO the entire weak dependency concept needs to be reevaluated. As argued previously [1], "recommends" isn't well defined and probably never will be.
From an RPM PoV it is very clear how recommends are supposed to be used:
https://rpm-software-management.github.io/rpm/manual/dependencies.html
""" In addition to the strong dependencies created by Requires, there are 4 dependencies that are completely ignored by rpm itself. Their purpose is to be used by dependency solvers to make choices about what packages to install. They come in two levels of strength:
Weak: By default the dependency solver shall attempt to process the dependency as though it were strong. If this is results in an error then they should be ignored and not trigger an error or warning.
Very weak: By default the dependency solver shall ignore them. But they may be used to show the matching packages as option to the user. """
Which also matches what zypper does - the default is set to recommends on - so 'weak' deps are treated as required unless they run into conflict situations (e.g a conflict with other packages or a package lock by a user)
The very weak deps (suggest/enhances) are not installed - zypper gives some info about the suggested packages (and the pkglist gen bot, the one that calculates the content of e.g the DVD, takes them into account to add more packages onto the DVD, and in case of 'two packages providing the symbol, we use suggest to 'make the one win over the other if no better decision can be made).
Understood. But still it depends on the package maintainer's gut feeling whether she'll put "recommends", "suggests", or nothing at all.
What we should probably look at are all those weird recommends that result with tex being pulled in. Nobody wants tex - except the ones that DO and thse users are happily installing it manually (and have no right to complain :P )
Yes, TeX is a major reason why I'm disabling recommends in the first place. Being old-fashioned, I still use LaTeX/Lyx for certain tasks, but I need only a handful of LaTex subpackages. But I believe there are other areas as well in which recommends lead to a bloated system. I admit I don't know in detail, because I always disable them. For stuff like TeX, but also languages with lots of modules like Python, it would be nice if the tool itself was able to locate missing packages using the package management system. The point I'm trying to make is that more often than not, "Recommends" could better be expressed by conditionals or complex dependencies. Like the "Supplements" that NetworkManager-ovs already contains. If there was an option to tell zypper to enable this sort of "Supplements" while ignoring unconditional "Recommends", I'd enable it. Martin