solver: return changeset even for partial solutions
otherwise --force does might not work during boot.cute-signatures
parent
f13ec9cf5e
commit
078e8b00d8
20
src/solver.c
20
src/solver.c
|
@ -991,22 +991,18 @@ int apk_solver_solve(struct apk_database *db,
|
||||||
} while (r == 0);
|
} while (r == 0);
|
||||||
|
|
||||||
/* collect packages */
|
/* collect packages */
|
||||||
if (ss->best_score.unsatisfiable == 0) {
|
if (changeset != NULL) {
|
||||||
if (changeset != NULL)
|
generate_changeset(db, ss->best_solution, changeset,
|
||||||
generate_changeset(db, ss->best_solution, changeset,
|
ss->solver_flags);
|
||||||
ss->solver_flags);
|
}
|
||||||
r = 0;
|
if (solution != NULL) {
|
||||||
} else {
|
|
||||||
qsort(ss->best_solution->item, ss->best_solution->num,
|
qsort(ss->best_solution->item, ss->best_solution->num,
|
||||||
sizeof(struct apk_package *), compare_package_name);
|
sizeof(struct apk_package *), compare_package_name);
|
||||||
r = ss->best_score.unsatisfiable;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (solution != NULL)
|
|
||||||
*solution = ss->best_solution;
|
*solution = ss->best_solution;
|
||||||
else
|
} else {
|
||||||
apk_package_array_free(&ss->best_solution);
|
apk_package_array_free(&ss->best_solution);
|
||||||
|
}
|
||||||
|
r = ss->best_score.unsatisfiable;
|
||||||
apk_solver_free(db);
|
apk_solver_free(db);
|
||||||
free(ss);
|
free(ss);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue