summaryrefslogtreecommitdiff
path: root/src/solver.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-06-13 18:20:39 +0300
committerTimo Teräs <timo.teras@iki.fi>2013-06-13 18:22:00 +0300
commite51232e710dfd32764e2c2d0599df83ab85a9c74 (patch)
tree5eac93c05cf2fe77d2857a48a9fc55c7bf7e33d0 /src/solver.c
parent25ff68a87e3264b6dfdc846823d4912b4dd870b2 (diff)
downloadapk-tools-e51232e710dfd32764e2c2d0599df83ab85a9c74.tar.gz
apk-tools-e51232e710dfd32764e2c2d0599df83ab85a9c74.tar.bz2
apk-tools-e51232e710dfd32764e2c2d0599df83ab85a9c74.tar.xz
apk-tools-e51232e710dfd32764e2c2d0599df83ab85a9c74.zip
errors: rewrite the logic how errors are reported
Instead of the dependency oriented logic, switch to print them for each package or name needed. Might give a bit more readable errors now. There's still few corner cases that proper error is not output, which are cought by the test cases.
Diffstat (limited to 'src/solver.c')
-rw-r--r--src/solver.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/solver.c b/src/solver.c
index 71a4d41..58bb30b 100644
--- a/src/solver.c
+++ b/src/solver.c
@@ -437,6 +437,9 @@ static int compare_providers(struct apk_solver_state *ss,
r = (int)pkgA->ss.dependencies_used - (int)pkgB->ss.dependencies_used;
if (r)
return r;
+ r = pkgB->ss.conflicts - pkgA->ss.conflicts;
+ if (r)
+ return r;
/* Prefer installed on self-upgrade */
solver_flags = pkgA->ss.solver_flags | pkgB->ss.solver_flags;