/* dontfix: dont care about conflicts with already installed packs */
if (dontfix && pool->solvables[p].repo == installed)
continue;
+ if (p == n && !solv->allowselfconflicts)
+ p = 0; /* make it a negative assertion */
/* rule: -n|-p: either solvable _or_ provider of conflict */
addrule(solv, -n, -p);
}
if (*dp == 0)
break;
}
- assert(req);
- *depp = req;
- return SOLVER_PROBLEM_NOTHING_PROVIDES_DEP;
+ if (req)
+ {
+ *depp = req;
+ return SOLVER_PROBLEM_NOTHING_PROVIDES_DEP;
+ }
+ assert(!solv->allowselfconflicts);
+ assert(s->conflicts);
+ conp = s->repo->idarraydata + s->conflicts;
+ while ((con = *conp++) != 0)
+ FOR_PROVIDES(p, pp, con)
+ if (p == -r->p)
+ {
+ *depp = con;
+ return SOLVER_PROBLEM_SELF_CONFLICT;
+ }
+ assert(0);
}
s = pool->solvables - r->p;
if (installed && !solv->fixsystem && s->repo == installed)
s = pool_id2solvable(pool, source);
POOL_DEBUG(SAT_DEBUG_RESULT, "package %s requires %s, but none of the providers can be installed\n", solvable2str(pool, s), dep2str(pool, dep));
return;
+ case SOLVER_PROBLEM_SELF_CONFLICT:
+ s = pool_id2solvable(pool, source);
+ POOL_DEBUG(SAT_DEBUG_RESULT, "package %s conflicts with %s provided by itself\n", solvable2str(pool, s), dep2str(pool, dep));
+ return;
}
}
int allowuninstall; /* allow removal of installed solvables */
int updatesystem; /* distupgrade */
int allowvirtualconflicts; /* false: conflicts on package name, true: conflicts on package provides */
+ int allowselfconflicts; /* true: packages wich conflict with itself are installable */
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 */
SOLVER_PROBLEM_SAME_NAME,
SOLVER_PROBLEM_PACKAGE_CONFLICT,
SOLVER_PROBLEM_PACKAGE_OBSOLETES,
- SOLVER_PROBLEM_DEP_PROVIDERS_NOT_INSTALLABLE
+ SOLVER_PROBLEM_DEP_PROVIDERS_NOT_INSTALLABLE,
+ SOLVER_PROBLEM_SELF_CONFLICT
} SolverProbleminfo;