summaryrefslogtreecommitdiff
path: root/src/solver.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/solver.c')
-rw-r--r--src/solver.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/solver.c b/src/solver.c
index a4e0c4b..57fa3e4 100644
--- a/src/solver.c
+++ b/src/solver.c
@@ -1443,6 +1443,8 @@ solver_get_flag(Solver *solv, int flag)
return solv->strongrecommends;
case SOLVER_FLAG_INSTALL_ALSO_UPDATES:
return solv->install_also_updates;
+ case SOLVER_FLAG_ONLY_NAMESPACE_RECOMMENDED:
+ return solv->only_namespace_recommended;
default:
break;
}
@@ -1533,6 +1535,9 @@ solver_set_flag(Solver *solv, int flag, int value)
case SOLVER_FLAG_INSTALL_ALSO_UPDATES:
solv->install_also_updates = value;
break;
+ case SOLVER_FLAG_ONLY_NAMESPACE_RECOMMENDED:
+ solv->only_namespace_recommended = value;
+ break;
default:
break;
}
@@ -2092,12 +2097,14 @@ resolve_weak(Solver *solv, int level, int disablerules, Queue *dq, Queue *dqs, i
Id *recp, rec, pp, p;
if (!solv->addalreadyrecommended && s->repo == solv->installed)
continue;
- /* XXX need to special case AND ? */
if (s->recommends)
{
recp = s->repo->idarraydata + s->recommends;
while ((rec = *recp++) != 0)
{
+ /* cheat: we just look if there is REL_NAMESPACE in the dep */
+ if (solv->only_namespace_recommended && !solver_is_namespace_dep(solv, rec))
+ continue;
#ifdef ENABLE_COMPLEX_DEPS
if (pool_is_complex_dep(pool, rec))
{
@@ -2186,7 +2193,7 @@ resolve_weak(Solver *solv, int level, int disablerules, Queue *dq, Queue *dqs, i
}
/* filter out all already supplemented packages if requested */
- if (!solv->addalreadyrecommended && dqs->count)
+ if ((!solv->addalreadyrecommended || solv->only_namespace_recommended) && dqs->count)
{
/* filter out old supplements */
for (i = j = 0; i < dqs->count; i++)
@@ -3245,7 +3252,7 @@ solver_solve(Solver *solv, Queue *job)
POOL_DEBUG(SOLV_DEBUG_STATS, "allowuninstall=%d, allowdowngrade=%d, allownamechange=%d, allowarchchange=%d, allowvendorchange=%d\n", solv->allowuninstall, solv->allowdowngrade, solv->allownamechange, solv->allowarchchange, solv->allowvendorchange);
POOL_DEBUG(SOLV_DEBUG_STATS, "promoteepoch=%d, forbidselfconflicts=%d\n", pool->promoteepoch, pool->forbidselfconflicts);
POOL_DEBUG(SOLV_DEBUG_STATS, "obsoleteusesprovides=%d, implicitobsoleteusesprovides=%d, obsoleteusescolors=%d, implicitobsoleteusescolors=%d\n", pool->obsoleteusesprovides, pool->implicitobsoleteusesprovides, pool->obsoleteusescolors, pool->implicitobsoleteusescolors);
- POOL_DEBUG(SOLV_DEBUG_STATS, "dontinstallrecommended=%d, addalreadyrecommended=%d\n", solv->dontinstallrecommended, solv->addalreadyrecommended);
+ POOL_DEBUG(SOLV_DEBUG_STATS, "dontinstallrecommended=%d, addalreadyrecommended=%d onlynamespacerecommended=%d\n", solv->dontinstallrecommended, solv->addalreadyrecommended, solv->only_namespace_recommended);
/* create whatprovides if not already there */
if (!pool->whatprovides)