+ return "best rule";
+ case SOLVER_RULE_PKG:
+ return "bad pkg rule type";
+ case SOLVER_RULE_PKG_NOT_INSTALLABLE:
+ ss = pool->solvables + source;
+ if (pool_disabled_solvable(pool, ss))
+ return pool_tmpjoin(pool, pool_solvid2str(pool, source), " is disabled", 0);
+ if (ss->arch && ss->arch != ARCH_SRC && ss->arch != ARCH_NOSRC &&
+ pool->id2arch && pool_arch2score(pool, ss->arch) == 0)
+ return pool_tmpjoin(pool, pool_solvid2str(pool, source), " does not have a compatible architecture", 0);
+ return pool_tmpjoin(pool, pool_solvid2str(pool, source), " is not installable", 0);
+ case SOLVER_RULE_PKG_NOTHING_PROVIDES_DEP:
+ s = pool_tmpjoin(pool, "nothing provides ", pool_dep2str(pool, dep), 0);
+ return pool_tmpappend(pool, s, " needed by ", pool_solvid2str(pool, source));
+ case SOLVER_RULE_PKG_SAME_NAME:
+ s = pool_tmpjoin(pool, "cannot install both ", pool_solvid2str(pool, source), 0);
+ return pool_tmpappend(pool, s, " and ", pool_solvid2str(pool, target));
+ case SOLVER_RULE_PKG_CONFLICTS:
+ s = pool_tmpappend(pool, pool_solvid2str(pool, source), " conflicts with ", pool_dep2str(pool, dep));
+ if (target)
+ s = pool_tmpappend(pool, s, " provided by ", pool_solvid2str(pool, target));
+ return s;
+ case SOLVER_RULE_PKG_SELF_CONFLICT:
+ s = pool_tmpjoin(pool, pool_solvid2str(pool, source), " conflicts with ", 0);
+ return pool_tmpappend(pool, s, pool_dep2str(pool, dep), " provided by itself");
+ case SOLVER_RULE_PKG_OBSOLETES:
+ s = pool_tmpappend(pool, pool_solvid2str(pool, source), " obsoletes ", pool_dep2str(pool, dep));
+ if (target)
+ s = pool_tmpappend(pool, s, " provided by ", pool_solvid2str(pool, target));
+ return s;
+ case SOLVER_RULE_PKG_INSTALLED_OBSOLETES:
+ s = pool_tmpjoin(pool, "installed ", pool_solvid2str(pool, source), 0);
+ s = pool_tmpappend(pool, s, " obsoletes ", pool_dep2str(pool, dep));
+ if (target)
+ s = pool_tmpappend(pool, s, " provided by ", pool_solvid2str(pool, target));
+ return s;
+ case SOLVER_RULE_PKG_IMPLICIT_OBSOLETES:
+ s = pool_tmpappend(pool, pool_solvid2str(pool, source), " implicitly obsoletes ", pool_dep2str(pool, dep));
+ if (target)
+ s = pool_tmpappend(pool, s, " provided by ", pool_solvid2str(pool, target));
+ return s;
+ case SOLVER_RULE_PKG_REQUIRES:
+ return pool_tmpjoin(pool, pool_solvid2str(pool, source), " requires ", pool_dep2str(pool, dep));
+ case SOLVER_RULE_PKG_RECOMMENDS:
+ return pool_tmpjoin(pool, pool_solvid2str(pool, source), " recommends ", pool_dep2str(pool, dep));
+ case SOLVER_RULE_PKG_CONSTRAINS:
+ s = pool_tmpappend(pool, pool_solvid2str(pool, source), " has constraint ", pool_dep2str(pool, dep));
+ return pool_tmpappend(pool, s, " conflicting with ", pool_solvid2str(pool, target));
+ case SOLVER_RULE_PKG_SUPPLEMENTS:
+ s = pool_tmpjoin(pool, pool_solvid2str(pool, source), " supplements ", pool_dep2str(pool, dep));
+ if (target)
+ s = pool_tmpappend(pool, s, " provided by ", pool_solvid2str(pool, target));
+ return s;
+ case SOLVER_RULE_YUMOBS:
+ s = pool_tmpjoin(pool, "both ", pool_solvid2str(pool, source), " and ");
+ s = pool_tmpjoin(pool, s, pool_solvid2str(pool, target), " obsolete ");
+ return pool_tmpappend(pool, s, pool_dep2str(pool, dep), 0);
+ case SOLVER_RULE_BLACK:
+ return pool_tmpjoin(pool, pool_solvid2str(pool, source), " can only be installed by a direct request", 0);
+ case SOLVER_RULE_STRICT_REPO_PRIORITY:
+ return pool_tmpjoin(pool, pool_solvid2str(pool, source), " is excluded by strict repo priority", 0);
+ case SOLVER_RULE_LEARNT:
+ return "learnt rule";
+ case SOLVER_RULE_CHOICE:
+ if (source > 0)