fix package preference based on it's conflicts in --latest mode
remove also redundant pkg_selectable check in repair mode.cute-signatures
parent
8fa193ecda
commit
a86c8ed082
|
@ -566,10 +566,6 @@ static int compare_providers(struct apk_solver_state *ss,
|
||||||
r = (int)pkgA->ss.pkg_available - (int)pkgB->ss.pkg_available;
|
r = (int)pkgA->ss.pkg_available - (int)pkgB->ss.pkg_available;
|
||||||
if (r)
|
if (r)
|
||||||
return 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 */
|
/* Prefer preferred pinning */
|
||||||
|
@ -618,6 +614,11 @@ static int compare_providers(struct apk_solver_state *ss,
|
||||||
if (r)
|
if (r)
|
||||||
return 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 */
|
/* Prefer lowest available repository */
|
||||||
return ffs(pkgB->repos) - ffs(pkgA->repos);
|
return ffs(pkgB->repos) - ffs(pkgA->repos);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue