diff options
Diffstat (limited to 'main/apk-tools/0001-solver-don-t-consider-requirer-count-for-preference.patch')
-rw-r--r-- | main/apk-tools/0001-solver-don-t-consider-requirer-count-for-preference.patch | 100 |
1 files changed, 0 insertions, 100 deletions
diff --git a/main/apk-tools/0001-solver-don-t-consider-requirer-count-for-preference.patch b/main/apk-tools/0001-solver-don-t-consider-requirer-count-for-preference.patch deleted file mode 100644 index 6634e2d3dcd..00000000000 --- a/main/apk-tools/0001-solver-don-t-consider-requirer-count-for-preference.patch +++ /dev/null @@ -1,100 +0,0 @@ -From 3cce27e83d068d274235995c03fed1e0f8a808fb Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi> -Date: Wed, 19 May 2021 16:29:55 +0300 -Subject: [PATCH] solver: don't consider requirer count for preference - -The original intent was to choose packages to which there is most -dependencies. However, since the code has evolved this is has been -mostly obsolete. And in fact now interferes with the provides and -provides priority mechanism. Remove this as obsolete. - -Fixes #10742 ---- - src/solver.c | 18 ------------------ - test/provides.repo | 22 ++++++++++++++++++++++ - test/provides13.test | 7 +++++++ - 3 files changed, 29 insertions(+), 18 deletions(-) - create mode 100644 test/provides13.test - -diff --git a/src/solver.c b/src/solver.c -index df63060..810c9ce 100644 ---- a/src/solver.c -+++ b/src/solver.c -@@ -493,17 +493,6 @@ static void reconsider_name(struct apk_solver_state *ss, struct apk_name *name) - name->name, name->ss.has_options, name->ss.reverse_deps_done); - } - --static int count_requirers(const struct apk_package *pkg) --{ -- int cnt = pkg->name->ss.requirers; -- struct apk_dependency *p; -- -- foreach_array_item(p, pkg->provides) -- cnt += p->name->ss.requirers; -- -- return cnt; --} -- - static int compare_providers(struct apk_solver_state *ss, - struct apk_provider *pA, struct apk_provider *pB) - { -@@ -597,13 +586,6 @@ static int compare_providers(struct apk_solver_state *ss, - return r; - } - -- /* Prefer highest requirer count. */ -- r = count_requirers(pkgA) - count_requirers(pkgB); -- if (r) { -- dbg_printf(" prefer highest requirer count\n"); -- return r; -- } -- - /* Prefer installed */ - if (!(solver_flags & APK_SOLVERF_UPGRADE)) { - r = (pkgA->ipkg != NULL) - (pkgB->ipkg != NULL); -diff --git a/test/provides.repo b/test/provides.repo -index 358151e..ed72f72 100644 ---- a/test/provides.repo -+++ b/test/provides.repo -@@ -111,3 +111,25 @@ V:0.1 - S:1 - I:1 - D:conflicted-provider-2 -+ -+C:Q1inqy40xXhjHaXUlG+qIshN+TIvA= -+P:pulseaudio-alsa -+V:1 -+S:1 -+I:1 -+k:10 -+ -+c:a79b3f751d72fd4bdb6729139660d0b4f5b87a33 -+P:pulseaudio -+V:1 -+S:1 -+I:1 -+k:10 -+ -+C:Q1FAFBeAhWPV1XXEdoW+TSjrUghxU= -+P:pipewire-pulse -+V:1 -+S:1 -+I:1 -+k:1 -+p:pulseaudio=1 pulseaudio-alsa=1 -diff --git a/test/provides13.test b/test/provides13.test -new file mode 100644 -index 0000000..5d6482d ---- /dev/null -+++ b/test/provides13.test -@@ -0,0 +1,7 @@ -+@ARGS -+--test-repo provides.repo -+add pulseaudio pulseaudio-alsa -+@EXPECT -+(1/2) Installing pulseaudio (1) -+(2/2) Installing pulseaudio-alsa (1) -+OK: 0 MiB in 0 packages --- -2.31.1 - |