+#ifdef ENABLE_CONDA
+void
+add_conda_constrains_rule(Solver *solv, Id n, Id dep, int dontfix)
+{
+ Pool *pool = solv->pool;
+ Reldep *rd;
+ Id p, pp, pdep;
+ if (!ISRELDEP(dep))
+ return;
+ rd = GETRELDEP(pool, dep);
+ pdep = pool_whatprovides(pool, dep);
+ FOR_PROVIDES(p, pp, rd->name)
+ {
+ Id p2;
+ if (p == n)
+ continue;
+ if (dontfix && pool->solvables[p].repo == solv->installed)
+ continue;
+ while ((p2 = pool->whatprovidesdata[pdep]) != 0 && p2 < p)
+ pdep++;
+ if (p == p2)
+ pdep++;
+ else
+ addpkgrule(solv, -n, -p, 0, SOLVER_RULE_PKG_CONSTRAINS, dep);
+ }
+}
+#endif
+