/* find recommended packages */
/* if redoq.count == 0 we already found all recommended in the
* solver run */
- if (redoq.count || solv->dontinstallrecommended)
+ if (redoq.count || solv->dontinstallrecommended || solv->showinstalledrecommended)
{
Id rec, *recp, p, *pp;
- /* create map of all suggests that are still open */
+ /* create map of all recommened packages */
solv->recommends_index = -1;
MAPZERO(&solv->recommendsmap);
for (i = 0; i < solv->decisionq.count; i++)
if (solv->decisionmap[p] > 0)
break;
if (p)
- continue; /* p != 0: already fulfilled */
+ {
+ if (solv->showinstalledrecommended)
+ {
+ FOR_PROVIDES(p, pp, rec)
+ if (solv->decisionmap[p] > 0)
+ MAPSET(&solv->recommendsmap, p);
+ }
+ continue; /* p != 0: already fulfilled */
+ }
FOR_PROVIDES(p, pp, rec)
MAPSET(&solv->recommendsmap, p);
}
}
for (i = 1; i < pool->nsolvables; i++)
{
- if (solv->decisionmap[i] != 0)
+ if (solv->decisionmap[i] < 0)
+ continue;
+ if (solv->decisionmap[i] > 0 && !solv->showinstalledrecommended)
continue;
s = pool->solvables + i;
if (!MAPTST(&solv->recommendsmap, i))
if (solv->decisionmap[p] > 0)
break;
if (p)
- continue; /* already fulfilled */
+ {
+ if (solv->showinstalledrecommended)
+ {
+ FOR_PROVIDES(p, pp, sug)
+ if (solv->decisionmap[p] > 0)
+ MAPSET(&solv->suggestsmap, p);
+ }
+ continue; /* already fulfilled */
+ }
FOR_PROVIDES(p, pp, sug)
MAPSET(&solv->suggestsmap, p);
}
}
for (i = 1; i < pool->nsolvables; i++)
{
- if (solv->decisionmap[i] != 0)
+ if (solv->decisionmap[i] < 0)
+ continue;
+ if (solv->decisionmap[i] > 0 && !solv->showinstalledrecommended)
continue;
s = pool->solvables + i;
if (!MAPTST(&solv->suggestsmap, i))
Id *obsoletes; /* obsoletes for each installed solvable */
Id *obsoletes_data; /* data area for obsoletes */
- Queue covenantq; /* Covenants honored by this solver (generic locks) */
-
/*-------------------------------------------------------------------------------------------------------------
* Solver configuration
*-------------------------------------------------------------------------------------------------------------*/
int noupdateprovide; /* true: update packages needs not to provide old package */
int dosplitprovides; /* true: consider legacy split provides */
int dontinstallrecommended; /* true: do not install recommended packages */
+ int showinstalledrecommended; /* true: add recommened packages that are already installed to the lists */
/* Callbacks for defining the bahaviour of the SAT solver */
*/
UpdateCandidateCb updateCandidateCb;
+
+ /* some strange queue that doesn't belong here */
+
+ Queue covenantq; /* Covenants honored by this solver (generic locks) */
+
} Solver;
for (i = 0; i < solv->recommendations.count; i++)
{
s = pool->solvables + solv->recommendations.elements[i];
- POOL_DEBUG(SAT_DEBUG_RESULT, "- %s%s\n", solvable2str(pool, s), solv->decisionmap[solv->recommendations.elements[i]] > 0 ? " (selected)" : "");
+ if (solv->decisionmap[solv->recommendations.elements[i]] > 0)
+ {
+ if (installed && s->repo == installed)
+ POOL_DEBUG(SAT_DEBUG_RESULT, "- %s (installed)\n", solvable2str(pool, s));
+ else
+ POOL_DEBUG(SAT_DEBUG_RESULT, "- %s (selected)\n", solvable2str(pool, s));
+ }
+ else
+ POOL_DEBUG(SAT_DEBUG_RESULT, "- %s\n", solvable2str(pool, s));
}
}
for (i = 0; i < solv->suggestions.count; i++)
{
s = pool->solvables + solv->suggestions.elements[i];
- POOL_DEBUG(SAT_DEBUG_RESULT, "- %s\n", solvable2str(pool, s));
+ if (solv->decisionmap[solv->suggestions.elements[i]] > 0)
+ {
+ if (installed && s->repo == installed)
+ POOL_DEBUG(SAT_DEBUG_RESULT, "- %s (installed)\n", solvable2str(pool, s));
+ else
+ POOL_DEBUG(SAT_DEBUG_RESULT, "- %s (selected)\n", solvable2str(pool, s));
+ }
+ else
+ POOL_DEBUG(SAT_DEBUG_RESULT, "- %s\n", solvable2str(pool, s));
}
}
}