Commit cca6a7e3 authored by Timo Teräs's avatar Timo Teräs
Browse files

solver: fix sorting when solver is used multiple times within run

namely this fixes apk upgrade without --no-self-upgrade when
the solver is called twice.
parent 21a213c2
......@@ -158,9 +158,10 @@ static void sort_hard_dependencies(struct apk_solver_state *ss, struct apk_packa
pkg->state_ptr = calloc(1, sizeof(struct apk_package_state));
ps = pkg_to_ps(pkg);
if (pkg->topology_hard)
if (ps->topology_soft)
pkg->topology_hard = -1;
ps->topology_soft = -1;
/* Consider hard dependencies only */
foreach_dependency_pkg(ss, pkg->depends, sort_hard_dependencies);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment