diff options
Diffstat (limited to 'src/solver.c')
-rw-r--r-- | src/solver.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/solver.c b/src/solver.c index 59edb1c..d83bb6a 100644 --- a/src/solver.c +++ b/src/solver.c @@ -762,11 +762,20 @@ static void cset_check_removal_by_iif(struct apk_solver_state *ss, struct apk_na static void cset_gen_name_change(struct apk_solver_state *ss, struct apk_name *name) { struct apk_name **pname; - struct apk_package *pkg = name->ss.chosen.pkg, *opkg; + struct apk_package *pkg, *opkg; struct apk_dependency *d; - if (pkg == NULL || pkg->ss.in_changeset) + if (name->ss.in_changeset) return; + + pkg = name->ss.chosen.pkg; + if (pkg == NULL) { + /* Package removal */ + opkg = name->ss.installed_pkg; + if (opkg) cset_gen_name_remove(ss, opkg); + name->ss.in_changeset = 1; return; + } + if (pkg->ss.in_changeset) return; pkg->ss.in_changeset = 1; pkg->name->ss.in_changeset = 1; |