diff options
author | Michael Schroeder <mls@suse.de> | 2014-04-22 18:19:07 +0200 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2014-04-22 18:19:07 +0200 |
commit | f78f5de33f216051d91b9ff143ace8f4579afecf (patch) | |
tree | 5d1c7587fa2a7d84649e90a2fd84e9bf93d70751 /src/solver.c | |
parent | 0b76b36879f871e751b94c2bf6cdf093aca2564d (diff) | |
download | libsolv-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.c | 29 |
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; |