Commit a86c8ed0 authored by Timo Teräs's avatar Timo Teräs

fix package preference based on it's conflicts in --latest mode

remove also redundant pkg_selectable check in repair mode.
parent 8fa193ec
......@@ -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);
}
......
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