Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tdnf installonly_limit implementation behavioral parity with DNF #460

Open
eric-desrochers opened this issue Dec 20, 2023 · 6 comments
Open

Comments

@eric-desrochers
Copy link

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:
image

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

@oliverkurth
Copy link
Contributor

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.

@eric-desrochers
Copy link
Author

@eric-desrochers
Copy link
Author

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

@oliverkurth
Copy link
Contributor

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.

@eric-desrochers
Copy link
Author

@oliverkurth any update on this behavioral gap between DNF and TDNF in the package removal logic after hitting the install limit ?

@oliverkurth
Copy link
Contributor

No update. But feel free to submit a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants