summaryrefslogtreecommitdiff
path: root/src/solver.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/solver.c')
-rw-r--r--src/solver.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/solver.c b/src/solver.c
index 5d73af6..5698215 100644
--- a/src/solver.c
+++ b/src/solver.c
@@ -567,6 +567,11 @@ static int compare_providers(struct apk_solver_state *ss,
if (r)
return r;
+ /* Prefer highest requirer count. */
+ r = count_requirers(pkgA) - count_requirers(pkgB);
+ if (r)
+ return r;
+
/* Prefer installed */
if (!(solver_flags & APK_SOLVERF_UPGRADE)) {
r = (pkgA->ipkg != NULL) - (pkgB->ipkg != NULL);
@@ -598,11 +603,6 @@ static int compare_providers(struct apk_solver_state *ss,
if (r)
return r;
- /* Prefer highest requirer count. */
- r = count_requirers(pkgA) - count_requirers(pkgB);
- if (r)
- return r;
-
/* Prefer highest declared provider priority. */
r = pkgA->provider_priority - pkgB->provider_priority;
if (r)