- element = 0;
- while ((element = solver_next_solutionelement(solv, problem, solution, element, &p, &rp)) != 0)
- {
- if (p == 0)
- {
- /* job, rp is index into job queue */
- how = job->elements[rp - 1] & ~SOLVER_WEAK;
- what = job->elements[rp];
- switch (how)
- {
- case SOLVER_INSTALL_SOLVABLE:
- s = pool->solvables + what;
- if (solv->installed && s->repo == solv->installed)
- POOL_DEBUG(SAT_DEBUG_RESULT, "- do not keep %s installed\n", solvable2str(pool, s));
- else
- POOL_DEBUG(SAT_DEBUG_RESULT, "- do not install %s\n", solvable2str(pool, s));
- break;
- case SOLVER_ERASE_SOLVABLE:
- s = pool->solvables + what;
- if (solv->installed && s->repo == solv->installed)
- POOL_DEBUG(SAT_DEBUG_RESULT, "- do not deinstall %s\n", solvable2str(pool, s));
- else
- POOL_DEBUG(SAT_DEBUG_RESULT, "- do not forbid installation of %s\n", solvable2str(pool, s));
- break;
- case SOLVER_INSTALL_SOLVABLE_NAME:
- POOL_DEBUG(SAT_DEBUG_RESULT, "- do not install %s\n", dep2str(pool, what));
- break;
- case SOLVER_ERASE_SOLVABLE_NAME:
- POOL_DEBUG(SAT_DEBUG_RESULT, "- do not deinstall %s\n", dep2str(pool, what));
- break;
- case SOLVER_INSTALL_SOLVABLE_PROVIDES:
- POOL_DEBUG(SAT_DEBUG_RESULT, "- do not install a solvable providing %s\n", dep2str(pool, what));
- break;
- case SOLVER_ERASE_SOLVABLE_PROVIDES:
- POOL_DEBUG(SAT_DEBUG_RESULT, "- do not deinstall all solvables providing %s\n", dep2str(pool, what));
- break;
- case SOLVER_INSTALL_SOLVABLE_UPDATE:
- s = pool->solvables + what;
- POOL_DEBUG(SAT_DEBUG_RESULT, "- do not install most recent version of %s\n", solvable2str(pool, s));
- break;
- default:
- POOL_DEBUG(SAT_DEBUG_RESULT, "- do something different\n");
- break;
- }
- }
- else
- {
- /* policy, replace p with rp */
- s = pool->solvables + p;
- sd = rp ? pool->solvables + rp : 0;
- if (sd)
- {
- int gotone = 0;
- if (!solv->allowdowngrade && evrcmp(pool, s->evr, sd->evr, EVRCMP_MATCH_RELEASE) > 0)
- {
- POOL_DEBUG(SAT_DEBUG_RESULT, "- allow downgrade of %s to %s\n", solvable2str(pool, s), solvable2str(pool, sd));
- gotone = 1;
- }
- if (!solv->allowarchchange && s->name == sd->name && s->arch != sd->arch && policy_illegal_archchange(solv, s, sd))
- {
- POOL_DEBUG(SAT_DEBUG_RESULT, "- allow architecture change of %s to %s\n", solvable2str(pool, s), solvable2str(pool, sd));
- gotone = 1;
- }
- if (!solv->allowvendorchange && s->name == sd->name && s->vendor != sd->vendor && policy_illegal_vendorchange(solv, s, sd))
- {
- if (sd->vendor)
- POOL_DEBUG(SAT_DEBUG_RESULT, "- allow vendor change from '%s' (%s) to '%s' (%s)\n", id2str(pool, s->vendor), solvable2str(pool, s), id2str(pool, sd->vendor), solvable2str(pool, sd));
- else
- POOL_DEBUG(SAT_DEBUG_RESULT, "- allow vendor change from '%s' (%s) to no vendor (%s)\n", id2str(pool, s->vendor), solvable2str(pool, s), solvable2str(pool, sd));
- gotone = 1;
- }
- if (!gotone)
- POOL_DEBUG(SAT_DEBUG_RESULT, "- allow replacement of %s with %s\n", solvable2str(pool, s), solvable2str(pool, sd));
- }
- else
- {
- POOL_DEBUG(SAT_DEBUG_RESULT, "- allow deinstallation of %s\n", solvable2str(pool, s));
- }
-
- }
- }
- POOL_DEBUG(SAT_DEBUG_RESULT, "\n");