diff options
Diffstat (limited to 'src/solver.c')
-rw-r--r-- | src/solver.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/solver.c b/src/solver.c index 7abc80c..5522707 100644 --- a/src/solver.c +++ b/src/solver.c @@ -566,10 +566,6 @@ static int compare_providers(struct apk_solver_state *ss, r = (int)pkgA->ss.pkg_available - (int)pkgB->ss.pkg_available; if (r) return r; - } else if (solver_flags & APK_SOLVERF_REINSTALL) { - r = (int)pkgA->ss.pkg_selectable - (int)pkgB->ss.pkg_selectable; - if (r) - return r; } /* Prefer preferred pinning */ @@ -618,6 +614,11 @@ static int compare_providers(struct apk_solver_state *ss, if (r) return r; + /* Prefer without errors (mostly if --latest used, and different provider) */ + r = (int)pkgA->ss.pkg_selectable - (int)pkgB->ss.pkg_selectable; + if (r) + return r; + /* Prefer lowest available repository */ return ffs(pkgB->repos) - ffs(pkgA->repos); } |