From f804e6bf5860a419cb20b7372d3f6d56461532dd Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Wed, 3 Jul 2024 22:57:53 +0530 Subject: solver_greedy: select derivation with the least cost if conformity is same --- src/solver_greedy.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/solver_greedy.c b/src/solver_greedy.c index 79472b5..215f678 100644 --- a/src/solver_greedy.c +++ b/src/solver_greedy.c @@ -66,6 +66,10 @@ int solver_greedy(struct job_clist *q, int32_t *max_build, struct job **job) conformity_max = conformity_cur; selected = j; } + if (conformity_cur == conformity_max && + selected->deps_filled > j->deps_filled) { + selected = j; + } } if (selected == NULL) -- cgit v1.2.3