diff options
author | sinanmohd <sinan@sinanmohd.com> | 2024-07-03 22:57:53 +0530 |
---|---|---|
committer | sinanmohd <sinan@sinanmohd.com> | 2024-07-03 22:57:58 +0530 |
commit | f804e6bf5860a419cb20b7372d3f6d56461532dd (patch) | |
tree | e3c03bdebbe4bbd6fe5859ac75c8f02c29f35a3b | |
parent | 5602a17e4c916c1fe90a0025fbdceb0621e2e9ba (diff) |
solver_greedy: select derivation with the least cost if conformity is same
-rw-r--r-- | src/solver_greedy.c | 4 |
1 files changed, 4 insertions, 0 deletions
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) |