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) #325
Conversation
|
Important!!! it requires upstream version of libsolv - may be 0.6.30 |
libdnf/hy-goal.c
Outdated
| @@ -1381,7 +1381,7 @@ hy_goal_get_reason(HyGoal goal, DnfPackage *pkg) | |||
| //solver_get_recommendations | |||
| if (goal->solv == NULL) | |||
| return HY_REASON_USER; | |||
| Id info; | |||
| Id info, pkg_id; | |||
| int reason = solver_describe_decision(goal->solv, dnf_package_get_id(pkg), &info); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small optimalization :-) Call dnf_package_get_id(pkg) only once.
const Id pkg_id = dnf_package_get_id(pkg);
Id info;
int reason = solver_describe_decision(goal->solv, pkg_id, &info);
and remove line 1399 pkg_id = dnf_package_get_id(pkg);
libdnf/hy-goal.c
Outdated
| queue_free(&cleandepsq); | ||
| return HY_REASON_CLEAN; | ||
| } | ||
| } | ||
| return HY_REASON_DEP; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Memory leak. Missing queue_free(&cleandepsq); before return.
If the package in cleandeps it will return SOLVER_REASON_CLEANDEPS_ERASE. https://bugzilla.redhat.com/show_bug.cgi?id=1486749
|
📌 Commit f366c03 has been approved by |
|
☀️ Test successful - status-papr |
If the package in cleandeps it will return SOLVER_REASON_CLEANDEPS_ERASE.
https://bugzilla.redhat.com/show_bug.cgi?id=1486749