Open eric-desrochers opened 11 months ago
When I implemented this I thought least recent would make most sense. We could add an option to control this behavior. Does dnf have such an option?
BTW, feel free to submit a PR. Currently, this feature is not used by Photon.
Seems like TDNF is leveraged by libsolv. Maybe there is an existing option in libsolv that does that instead of SOLVER_ERASE
?
https://github.com/openSUSE/libsolv/blob/master/doc/libsolv-bindings.txt
Seems like TDNF is leveraged by libsolv. Maybe there is an existing option in libsolv that does that instead of SOLVER_ERASE
No, AFAIK this needs to be done in tdnf
. libsolv
just has an option to make it possible to install multiple versions (SOLVER_MULTIVERSION
). When I researched this I found that zypper
(SuSE's package manager) has a different logic for removing older versions.
Thanks for pointing out the --oldinstallonly
option, that maybe useful for tdnf
as well.
@oliverkurth any update on this behavioral gap between DNF and TDNF in the package removal logic after hitting the install limit ?
No update. But feel free to submit a PR.
Is your feature request related to a problem? Please describe.
TDNF is removing package by least recent installation, while DNF is by lower package version. https://github.com/oliverkurth/tdnf/blob/8c73a0e825e5e14496c30a3ccfb829aeaf019749/client/goal.c#L1104-L1105
Example showing the behavior discrepancy between TDNF and DNF:
Describe the solution you'd like
It would be optimal to be in parity with DNF to that regards.
Describe alternatives you've considered
n/a
Additional context
n/a