diff options
author | Timo Teräs <timo.teras@iki.fi> | 2011-09-15 09:48:51 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2011-09-15 09:49:25 +0300 |
commit | cca6a7e33265fd933c57d3e2b04f1a522c25c3e0 (patch) | |
tree | bb3657c1423c26f1b76f7977563291ddcd4be8e3 | |
parent | 21a213c2124189278f90afaf3cfbbee21f45b6ee (diff) | |
download | apk-tools-cca6a7e33265fd933c57d3e2b04f1a522c25c3e0.tar.gz apk-tools-cca6a7e33265fd933c57d3e2b04f1a522c25c3e0.tar.bz2 apk-tools-cca6a7e33265fd933c57d3e2b04f1a522c25c3e0.tar.xz apk-tools-cca6a7e33265fd933c57d3e2b04f1a522c25c3e0.zip |
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.
-rw-r--r-- | src/solver.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/solver.c b/src/solver.c index b8dcc62..53fded2 100644 --- a/src/solver.c +++ b/src/solver.c @@ -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) return; pkg->topology_hard = -1; + ps->topology_soft = -1; /* Consider hard dependencies only */ foreach_dependency_pkg(ss, pkg->depends, sort_hard_dependencies); |