Commit 0276e227 authored by Timo Teräs's avatar Timo Teräs

remove reverse dependencies first

when removing large sets of packets, the ordering of removal
was not quaranteed to honor dependencies. this fixes the removal
order to be in reverse dependency order as far as possible.
parent 02cd5a9c
......@@ -802,6 +802,11 @@ static void cset_gen_name_change(struct apk_solver_state *ss, struct apk_name *n
cset_track_deps_removed(ss, opkg);
}
static void cset_gen_name_remove0(struct apk_package *pkg0, struct apk_dependency *dep0, struct apk_package *pkg, void *ctx)
{
cset_gen_name_remove(ctx, pkg0);
}
static void cset_gen_name_remove(struct apk_solver_state *ss, struct apk_package *pkg)
{
struct apk_name *name = pkg->name, **pname;
......@@ -813,6 +818,7 @@ static void cset_gen_name_remove(struct apk_solver_state *ss, struct apk_package
name->ss.in_changeset = 1;
pkg->ss.in_changeset = 1;
apk_pkg_foreach_reverse_dependency(pkg, APK_FOREACH_INSTALLED|APK_DEP_SATISFIES, cset_gen_name_remove0, ss);
foreach_array_item(pname, pkg->name->rinstall_if)
cset_check_removal_by_iif(ss, *pname);
record_change(ss, pkg, NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment