diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2019-09-10 15:37:46 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2019-09-10 15:37:46 +0900 |
commit | 0e46e80434781d1acbc4f5716827bf8688450a30 (patch) | |
tree | bd75ab938e88eb1e111c3bcb099d7a6793bd4364 /src/problems.c | |
parent | e679b515eddb3dd340fb25620de0160211f40fdc (diff) | |
download | libsolv-0e46e80434781d1acbc4f5716827bf8688450a30.tar.gz libsolv-0e46e80434781d1acbc4f5716827bf8688450a30.tar.bz2 libsolv-0e46e80434781d1acbc4f5716827bf8688450a30.zip |
Imported Upstream version 0.6.36upstream/0.6.36
Diffstat (limited to 'src/problems.c')
-rw-r--r-- | src/problems.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/problems.c b/src/problems.c index df751c4..2b5cefd 100644 --- a/src/problems.c +++ b/src/problems.c @@ -247,8 +247,23 @@ solver_autouninstall(Solver *solv, int start) if (v >= solv->updaterules && v < solv->updaterules_end) { Rule *r; + Id p = solv->installed->start + (v - solv->updaterules); if (m && !MAPTST(m, v - solv->updaterules)) continue; + if (pool->considered && !MAPTST(pool->considered, p)) + continue; /* do not uninstalled disabled packages */ + if (solv->bestrules_pkg && solv->bestrules_end > solv->bestrules) + { + int j; + for (j = start + 1; j < solv->problems.count - 1; j++) + { + Id vv = solv->problems.elements[j]; + if (vv >= solv->bestrules && vv < solv->bestrules_end && solv->bestrules_pkg[vv - solv->bestrules] == p) + break; + } + if (j < solv->problems.count - 1) + continue; /* best rule involved, do not uninstall */ + } /* check if identical to feature rule, we don't like that (except for orphans) */ r = solv->rules + solv->featurerules + (v - solv->updaterules); if (!r->p) @@ -260,7 +275,7 @@ solver_autouninstall(Solver *solv, int start) if (solv->keep_orphans) { r = solv->rules + v; - if (!r->d && !r->w2 && r->p == (solv->installed->start + (v - solv->updaterules))) + if (!r->d && !r->w2 && r->p == p) { lastfeature = v; lastupdate = 0; |