42 lines
1.5 KiB
Diff
42 lines
1.5 KiB
Diff
|
From 8542225bad5c1616b4ebe1ab78a6bf320726afd9 Mon Sep 17 00:00:00 2001
|
||
|
From: Michael Schroeder <mls@suse.de>
|
||
|
Date: Wed, 14 Oct 2015 14:30:46 +0200
|
||
|
Subject: [PATCH 6/6] Make keep_orphans also keep multiversion orphans
|
||
|
installed
|
||
|
|
||
|
Also make keep_orphanse add multiversion orphans to the
|
||
|
update rule, thus enforcing that they stay installed.
|
||
|
---
|
||
|
src/rules.c | 8 ++++++++
|
||
|
1 file changed, 8 insertions(+)
|
||
|
|
||
|
diff --git a/src/rules.c b/src/rules.c
|
||
|
index 97ccc6e..381cb22 100644
|
||
|
--- a/src/rules.c
|
||
|
+++ b/src/rules.c
|
||
|
@@ -1302,6 +1302,8 @@ solver_addupdaterule(Solver *solv, Solvable *s, int allow_all)
|
||
|
if (j == 0 && p == -SYSTEMSOLVABLE && solv->dupmap_all)
|
||
|
{
|
||
|
queue_push(&solv->orphaned, s - pool->solvables); /* also treat as orphaned */
|
||
|
+ if (solv->keep_orphans && !(solv->droporphanedmap_all || (solv->droporphanedmap.size && MAPTST(&solv->droporphanedmap, s - pool->solvables - solv->installed->start))))
|
||
|
+ p = s - pool->solvables; /* keep this orphaned package installed */
|
||
|
j = qs.count;
|
||
|
}
|
||
|
qs.count = j;
|
||
|
@@ -1844,6 +1846,12 @@ solver_addduprules(Solver *solv, Map *addedmap)
|
||
|
r += solv->updaterules - solv->featurerules;
|
||
|
if (r->p == p && !r->d)
|
||
|
ip = p;
|
||
|
+ else if (solv->dupmap_all && solv->multiversion.size)
|
||
|
+ {
|
||
|
+ r = solv->rules + solv->updaterules + (p - solv->installed->start);
|
||
|
+ if (r->p == p)
|
||
|
+ ip = p;
|
||
|
+ }
|
||
|
}
|
||
|
if (!ip)
|
||
|
solver_addrule(solv, -p, 0, 0); /* no match, sorry */
|
||
|
--
|
||
|
2.4.3
|
||
|
|