libsolv/0001-Move-allowuninstall-map-creation.patch

65 lines
2.2 KiB
Diff
Raw Normal View History

From 80ddee19786b7b96d28cde1b972721dc631ee055 Mon Sep 17 00:00:00 2001
From: Michael Schroeder <mls@suse.de>
Date: Mon, 12 Oct 2015 13:43:05 +0200
Subject: [PATCH 1/4] Move allowuninstall map creation
We need to test for them when we have dup jobs
---
src/solver.c | 26 ++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/src/solver.c b/src/solver.c
index c6cad6b..f371546 100644
--- a/src/solver.c
+++ b/src/solver.c
@@ -3561,6 +3561,19 @@ solver_solve(Solver *solv, Queue *job)
MAPSET(&solv->droporphanedmap, p - installed->start);
}
break;
+ case SOLVER_ALLOWUNINSTALL:
+ if (select == SOLVER_SOLVABLE_ALL || (select == SOLVER_SOLVABLE_REPO && installed && what == installed->repoid))
+ solv->allowuninstall_all = 1;
+ FOR_JOB_SELECT(p, pp, select, what)
+ {
+ s = pool->solvables + p;
+ if (s->repo != installed)
+ continue;
+ if (!solv->allowuninstallmap.size)
+ map_grow(&solv->allowuninstallmap, installed->end - installed->start);
+ MAPSET(&solv->allowuninstallmap, p - installed->start);
+ }
+ break;
default:
break;
}
@@ -3608,7 +3621,7 @@ solver_solve(Solver *solv, Queue *job)
if (how & SOLVER_FORCEBEST)
solv->bestupdatemap_all = 1;
}
- if (!solv->dupmap_all || solv->allowuninstall)
+ if (!solv->dupmap_all || solv->allowuninstall || solv->allowuninstall_all || solv->allowuninstallmap.size)
hasdupjob = 1;
break;
default:
@@ -3917,17 +3930,6 @@ solver_solve(Solver *solv, Queue *job)
break;
case SOLVER_ALLOWUNINSTALL:
POOL_DEBUG(SOLV_DEBUG_JOB, "job: allowuninstall %s\n", solver_select2str(pool, select, what));
- if (select == SOLVER_SOLVABLE_ALL || (select == SOLVER_SOLVABLE_REPO && installed && what == installed->repoid))
- solv->allowuninstall_all = 1;
- FOR_JOB_SELECT(p, pp, select, what)
- {
- s = pool->solvables + p;
- if (s->repo != installed)
- continue;
- if (!solv->allowuninstallmap.size)
- map_grow(&solv->allowuninstallmap, installed->end - installed->start);
- MAPSET(&solv->allowuninstallmap, p - installed->start);
- }
break;
default:
POOL_DEBUG(SOLV_DEBUG_JOB, "job: unknown job\n");
--
2.6.1