47 lines
1.5 KiB
Diff
47 lines
1.5 KiB
Diff
|
From 0cb7e546662ba7bb3d802e3b1ca4defea7f08c70 Mon Sep 17 00:00:00 2001
|
||
|
From: Michael Schroeder <mls@suse.de>
|
||
|
Date: Fri, 30 Nov 2018 14:28:59 +0100
|
||
|
Subject: [PATCH 2/4] Do not auto-erase disabled packages
|
||
|
|
||
|
(cherry picked from commit 581a11d3eaef9977344ea524e0290d59acdf9114)
|
||
|
---
|
||
|
src/problems.c | 2 ++
|
||
|
test/testcases/allowuninstall/conflict.t | 12 ++++++++++++
|
||
|
2 files changed, 14 insertions(+)
|
||
|
create mode 100644 test/testcases/allowuninstall/conflict.t
|
||
|
|
||
|
diff --git a/src/problems.c b/src/problems.c
|
||
|
index df751c4f..68ff61d7 100644
|
||
|
--- a/src/problems.c
|
||
|
+++ b/src/problems.c
|
||
|
@@ -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
|
||
|
index 00000000..8dc8024b
|
||
|
--- /dev/null
|
||
|
+++ b/test/testcases/allowuninstall/conflict.t
|
||
|
@@ -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>
|
||
|
+
|
||
|
--
|
||
|
2.19.2
|
||
|
|