]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Do not auto-erase disabled packages
authorMichael Schroeder <mls@suse.de>
Fri, 30 Nov 2018 13:28:59 +0000 (14:28 +0100)
committerMichael Schroeder <mls@suse.de>
Fri, 30 Nov 2018 13:28:59 +0000 (14:28 +0100)
src/problems.c
test/testcases/allowuninstall/conflict.t [new file with mode: 0644]

index df751c4fae884d0d215e9453c74b605ad7b1bd83..68ff61d7ba34b7f14238f5beb42cf62a21672823 100644 (file)
@@ -249,6 +249,8 @@ solver_autouninstall(Solver *solv, int start)
          Rule *r;
          if (m && !MAPTST(m, v - solv->updaterules))
            continue;
+         if (pool->considered && !MAPTST(pool->considered, solv->installed->start + (v - solv->updaterules)))
+           continue;   /* do not uninstalled disabled packages */
          /* 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)
diff --git a/test/testcases/allowuninstall/conflict.t b/test/testcases/allowuninstall/conflict.t
new file mode 100644 (file)
index 0000000..8dc8024
--- /dev/null
@@ -0,0 +1,12 @@
+repo system 0 testtags <inline>
+#>=Pkg: a 1 1 noarch
+#>=Con: b
+repo available 0 testtags <inline>
+#>=Pkg: b 1 1 noarch
+
+system x86_64 rpm system
+solverflags allowuninstall
+disable pkg a-1-1.noarch@system
+job install name b
+result transaction,problems <inline>
+