diff options
Diffstat (limited to 'src/policy.c')
-rw-r--r-- | src/policy.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/policy.c b/src/policy.c index fe8d55e..6551cbf 100644 --- a/src/policy.c +++ b/src/policy.c @@ -833,6 +833,7 @@ move_installed_to_front(Pool *pool, Queue *plist) } } +#ifdef ENABLE_CONDA static int pool_buildversioncmp(Pool *pool, Solvable *s1, Solvable *s2) { @@ -858,6 +859,7 @@ pool_buildflavorcmp(Pool *pool, Solvable *s1, Solvable *s2) return 0; return pool_evrcmp_str(pool, f1 ? f1 : "" , f2 ? f2 : "", EVRCMP_COMPARE); } +#endif /* * prune_to_best_version @@ -906,10 +908,17 @@ prune_to_best_version(Pool *pool, Queue *plist) if (r == 0 && has_package_link(pool, s)) r = pool_link_evrcmp(pool, best, s); #endif - if (r == 0 && pool->disttype == DISTTYPE_CONDA) - r = pool_buildversioncmp(pool, best, s); - if (r == 0 && pool->disttype == DISTTYPE_CONDA) - r = pool_buildflavorcmp(pool, best, s); +#ifdef ENABLE_CONDA + if (pool->disttype == DISTTYPE_CONDA) + { + if (r == 0) + r = (best->repo ? best->repo->subpriority : 0) - (s->repo ? s->repo->subpriority : 0); + if (r == 0) + r = pool_buildversioncmp(pool, best, s); + if (r == 0) + r = pool_buildflavorcmp(pool, best, s); + } +#endif if (r < 0) best = s; } |