diff options
author | Timo Teräs <timo.teras@iki.fi> | 2022-12-20 21:58:41 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2022-12-20 22:43:31 +0200 |
commit | 9482a9d7d49597da1f28b21642ba602e864b91df (patch) | |
tree | f749b93042e4df0429202b3900b694896ef47006 /src | |
parent | bcaf2ebd85cdceee8a90cef566bb3ebc4153cbbe (diff) | |
download | apk-tools-9482a9d7d49597da1f28b21642ba602e864b91df.tar.gz apk-tools-9482a9d7d49597da1f28b21642ba602e864b91df.tar.bz2 apk-tools-9482a9d7d49597da1f28b21642ba602e864b91df.tar.xz apk-tools-9482a9d7d49597da1f28b21642ba602e864b91df.zip |
solver: fix queue resolving order
It makes sense to not prioritize requirers anymore. It was
originally intended to select early packages with multiple
constraints seen. However, more important are the constraints
that actually limit the choise.
fixes #10843
Diffstat (limited to 'src')
-rw-r--r-- | src/solver.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/solver.c b/src/solver.c index d7386d2..68aec53 100644 --- a/src/solver.c +++ b/src/solver.c @@ -1023,13 +1023,13 @@ static int compare_name_dequeue(const struct apk_name *a, const struct apk_name { int r; - r = (!!a->ss.requirers) - (!!b->ss.requirers); - if (r) return -r; - r = (int)a->priority - (int)b->priority; if (r) return r; r = a->ss.max_dep_chain - b->ss.max_dep_chain; + if (r) return -r; + + r = (!!a->ss.requirers) - (!!b->ss.requirers); return -r; } |