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
Modify solver_describe_decision to report cleaned (RhBug:1486749) #226
Conversation
|
I don't think that makes sense. If the decision was done because of a unit rule this should be reported. What you're basically doing is that you map all the unit rule decisions done because of a cleandeps erase to SOLVER_REASON_CLEANDEPS_ERASE. This deprives the library user of important information. If you really need something like this you should do it in the layer on top of libsolv. (Furthermore your patch has a bug: it overwrites the content of |
It prioritize return SOLVER_REASON_CLEANDEPS_ERASE then SOLVER_REASON_UNIT_RULE. In reported cases in bug report it provide confusing output. https://bugzilla.redhat.com/show_bug.cgi?id=1486749
|
I try to distinguish between removal of unused dependencies and removal of packages that has to be removed due to removal of their dependency, but the current implementation provides confusing information in complex tasks. To get reason of removed packages we use Example 2: It means that by the present implementation I cannot distinguish between reason of removal of testB in first example and osinfo-db in second example. From my point of view the osinfo-db should be reported as SOLVER_REASON_CLEANDEPS_ERASE. Additional information in this case are really confusing (SOLVER_RULE_PKG). Probably we use incorrect functionality in libsolv, or some part of code works incorrect, but the present implementation does not help us to get information that we requires. Thanks a lot for your help. |
|
The point that I'm trying to make is that the reason is no good indicator for the cleandeps status. Consider this testcase: This gives the following result: As you can see, there is no cleandeps reason at all. But B is erased because of cleandeps. IMHO libsolv should get a new interface to query cleandeps packages, e.g. |
|
I added that in commit 03fb95e Please check if that meets your needs and reopen if not. |
|
@mlschroe Thanks a lot, it looks like that this is an alternative solution. I already created a patch that will use the functionality (rpm-software-management/libdnf#325). |
It prioritize return SOLVER_REASON_CLEANDEPS_ERASE then SOLVER_REASON_UNIT_RULE.
In reported cases in bug report it provide confusing output.
https://bugzilla.redhat.com/show_bug.cgi?id=1486749