-
Notifications
You must be signed in to change notification settings - Fork 87
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
Not all unused dependences are offered to be removed on uninstall #1839
Comments
Were those two dnf commands run back-to-back, or was there any other dnf activity in between? Some packages may not have been removed because they are direct or indirect dependencies of a protected package. So for example in this scenario:
The
(the reporting here could have been better and clearly say |
|
That's strange. Would you mind sharing solver debugging data for the removal operation?
This should create in the working directory quite a large |
I've emailed the debug log. |
Thank you, your debug data were very helpful. Here is a minimal reproducer for your issue in libsolv testcase format:
(The last line Let me translate it to English. Let's have a system with three packages installed:
Now, attempting to remove I believe the dnf behavior here is correct. You can either remove I propose closing this issue as "not a bug". |
Exactly what I thought. I'm not a fan of saying that's all working as intended. Logically your reasoning seems off. Previously installed packages didn't have this package installed as an optional/recommended dependency, meaning the user consciously chose not to have it. Now RPM/DNF/libsolve decide for the user that this recommended package is still needed due to a weak dependency against some other previously installed packages on the system. Either way, you have the final say. If you think that's all fine, so be it. |
Although I admit that you are right, the implementation will be challenging and would require changes in the To fully address the issue, dnf would need to retain information about whether each package was installed with or without weak dependencies and then inform libsolv so that the recommends from packages installed without weak dependencies don’t block removal. I can keep this open with low priority, but honestly, I don’t think the benefits of this change would justify the resources required to implement it. |
Thanks. I guess you may as well never implement this feature and leave this bug report open, so that people could find it and realize what's going on. |
This is an interesting issue, to me it looks like the other side of Based on that I think libsolv already could have the needed syntax to support that: SOLVER_EXCLUDEFROMWEAK. Unfortunately it doesn't seem to work, adding |
For now, I'm thinking about documenting the current behavior in dnf-remove(8) and dnf.conf(5), section |
Test case:
Now let's uninstall it:
Maybe it was just like that with
dnf
but I'm not sure.Using dnf5 in fully updated Fedora 41.
The text was updated successfully, but these errors were encountered: