From d7dd5733655b1e3c6fe6e75a406a2cf45d662952 Mon Sep 17 00:00:00 2001 From: Wolf Vollprecht Date: Wed, 2 Jun 2021 15:13:15 +0200 Subject: [PATCH] enable build timestamp maximization --- src/policy.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/policy.c b/src/policy.c index c02d23730..11052c910 100644 --- a/src/policy.c +++ b/src/policy.c @@ -76,6 +76,17 @@ prune_to_best_version_sortcmp(const void *ap, const void *bp, void *dp) } /* sort by repository sub-prio (installed repo handled above) */ r = (sb->repo ? sb->repo->subpriority : 0) - (sa->repo ? sa->repo->subpriority : 0); +#ifdef ENABLE_CONDA + if (r == 0) + { + Repodata* ra = repo_last_repodata(sa->repo); + Repodata* rb = repo_last_repodata(sb->repo); + + unsigned long long bta = repodata_lookup_num(ra, a, SOLVABLE_BUILDTIME, 0ull); + unsigned long long btb = repodata_lookup_num(rb, b, SOLVABLE_BUILDTIME, 0ull); + r = bta - btb; + } +#endif if (r) return r; /* no idea about the order, sort by id */