diff options
author | Timo Teräs <timo.teras@iki.fi> | 2022-12-21 21:16:41 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2022-12-21 21:16:41 +0200 |
commit | 4476e36b7dd5083211d061adb0a75c18748df8c8 (patch) | |
tree | cff436e4e1d9ea4cf568f0d28f2009e0be34af6a /src/solver.c | |
parent | de0cad11c9f87d945f94612e20dee824aca3df6a (diff) | |
download | apk-tools-4476e36b7dd5083211d061adb0a75c18748df8c8.tar.gz apk-tools-4476e36b7dd5083211d061adb0a75c18748df8c8.tar.bz2 apk-tools-4476e36b7dd5083211d061adb0a75c18748df8c8.tar.xz apk-tools-4476e36b7dd5083211d061adb0a75c18748df8c8.zip |
solver: fix install_if via provides only
fixes #10721
Diffstat (limited to 'src/solver.c')
-rw-r--r-- | src/solver.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/solver.c b/src/solver.c index 68aec53..a591818 100644 --- a/src/solver.c +++ b/src/solver.c @@ -231,6 +231,13 @@ static void discover_name(struct apk_solver_state *ss, struct apk_name *name) pkg->ss.max_dep_chain = max(pkg->ss.max_dep_chain, dep->name->ss.max_dep_chain+1); } + foreach_array_item(pname0, pkg->name->rinstall_if) + discover_name(ss, *pname0); + foreach_array_item(dep, pkg->provides) { + if (dep->name->ss.seen) continue; + foreach_array_item(pname0, dep->name->rinstall_if) + discover_name(ss, *pname0); + } dbg_printf("discover " PKG_VER_FMT ": tag_ok=%d, tag_pref=%d max_dep_chain=%d selectable=%d\n", PKG_VER_PRINTF(pkg), @@ -246,8 +253,6 @@ static void discover_name(struct apk_solver_state *ss, struct apk_name *name) dbg_printf("discover %s: max_dep_chain=%d no_iif=%d\n", name->name, name->ss.max_dep_chain, name->ss.no_iif); } - foreach_array_item(pname0, name->rinstall_if) - discover_name(ss, *pname0); } static void name_requirers_changed(struct apk_solver_state *ss, struct apk_name *name) |