summaryrefslogtreecommitdiff
path: root/src/solver.c
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2014-04-22 18:19:07 +0200
committerMichael Schroeder <mls@suse.de>2014-04-22 18:19:07 +0200
commitf78f5de33f216051d91b9ff143ace8f4579afecf (patch)
tree5d1c7587fa2a7d84649e90a2fd84e9bf93d70751 /src/solver.c
parent0b76b36879f871e751b94c2bf6cdf093aca2564d (diff)
downloadlibsolv-f78f5de33f216051d91b9ff143ace8f4579afecf.tar.gz
libsolv-f78f5de33f216051d91b9ff143ace8f4579afecf.tar.bz2
libsolv-f78f5de33f216051d91b9ff143ace8f4579afecf.zip
obey droporphaned map in keep_orhans mode
Diffstat (limited to 'src/solver.c')
-rw-r--r--src/solver.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/src/solver.c b/src/solver.c
index 282dd78..065cb7f 100644
--- a/src/solver.c
+++ b/src/solver.c
@@ -3359,6 +3359,7 @@ solver_solve(Solver *solv, Queue *job)
if (installed)
{
/* check for update/verify jobs as they need to be known early */
+ /* also setup the droporphaned map, we need it when creating update rules */
for (i = 0; i < job->count; i += 2)
{
how = job->elements[i];
@@ -3444,6 +3445,19 @@ solver_solve(Solver *solv, Queue *job)
add_update_target(solv, p, how);
}
break;
+ case SOLVER_DROP_ORPHANED:
+ if (select == SOLVER_SOLVABLE_ALL || (select == SOLVER_SOLVABLE_REPO && what == installed->repoid))
+ solv->droporphanedmap_all = 1;
+ FOR_JOB_SELECT(p, pp, select, what)
+ {
+ s = pool->solvables + p;
+ if (s->repo != installed)
+ continue;
+ if (!solv->droporphanedmap.size)
+ map_grow(&solv->droporphanedmap, installed->end - installed->start);
+ MAPSET(&solv->droporphanedmap, p - installed->start);
+ }
+ break;
default:
break;
}
@@ -3777,17 +3791,6 @@ solver_solve(Solver *solv, Queue *job)
break;
case SOLVER_DROP_ORPHANED:
POOL_DEBUG(SOLV_DEBUG_JOB, "job: drop orphaned %s\n", solver_select2str(pool, select, what));
- if (select == SOLVER_SOLVABLE_ALL || (select == SOLVER_SOLVABLE_REPO && installed && what == installed->repoid))
- solv->droporphanedmap_all = 1;
- FOR_JOB_SELECT(p, pp, select, what)
- {
- s = pool->solvables + p;
- if (!installed || s->repo != installed)
- continue;
- if (!solv->droporphanedmap.size)
- map_grow(&solv->droporphanedmap, installed->end - installed->start);
- MAPSET(&solv->droporphanedmap, p - installed->start);
- }
break;
case SOLVER_USERINSTALLED:
POOL_DEBUG(SOLV_DEBUG_JOB, "job: user installed %s\n", solver_select2str(pool, select, what));
@@ -3797,10 +3800,6 @@ solver_solve(Solver *solv, Queue *job)
break;
}
- /*
- * debug
- */
-
IF_POOLDEBUG (SOLV_DEBUG_JOB)
{
int j;