SolverRuleinfo type = solver_ruleinfo(solver, rule, &source, &target, &dep);
- char s[STRING_SIZE];
+ char s[1024];
switch (type) {
case SOLVER_RULE_DISTUPGRADE:
- snprintf(s, STRING_SIZE - 1,
+ snprintf(s, sizeof(s) - 1,
_("%s does not belong to a distupgrade repository"),
pool_solvid2str(pool, source)
);
break;
case SOLVER_RULE_INFARCH:
- snprintf(s, STRING_SIZE - 1,
+ snprintf(s, sizeof(s) - 1,
_("%s has inferior architecture"),
pool_solvid2str(pool, source)
);
break;
case SOLVER_RULE_UPDATE:
- snprintf(s, STRING_SIZE - 1,
+ snprintf(s, sizeof(s) - 1,
_("problem with installed package %s"),
pool_solvid2str(pool, source)
);
break;
case SOLVER_RULE_JOB:
- snprintf(s, STRING_SIZE - 1, _("conflicting requests"));
+ snprintf(s, sizeof(s) - 1, _("conflicting requests"));
break;
case SOLVER_RULE_JOB_UNSUPPORTED:
- snprintf(s, STRING_SIZE - 1, _("unsupported request"));
+ snprintf(s, sizeof(s) - 1, _("unsupported request"));
break;
case SOLVER_RULE_JOB_NOTHING_PROVIDES_DEP:
- snprintf(s, STRING_SIZE - 1,
+ snprintf(s, sizeof(s) - 1,
_("nothing provides requested %s"),
pool_dep2str(pool, dep)
);
break;
case SOLVER_RULE_JOB_UNKNOWN_PACKAGE:
- snprintf(s, STRING_SIZE - 1, _("package %s does not exist"),
+ snprintf(s, sizeof(s) - 1, _("package %s does not exist"),
pool_dep2str(pool, dep)
);
break;
case SOLVER_RULE_JOB_PROVIDED_BY_SYSTEM:
- snprintf(s, STRING_SIZE - 1, _("%s is provided by the system"),
+ snprintf(s, sizeof(s) - 1, _("%s is provided by the system"),
pool_dep2str(pool, dep)
);
break;
case SOLVER_RULE_RPM:
- snprintf(s, STRING_SIZE - 1, _("some dependency problem"));
+ snprintf(s, sizeof(s) - 1, _("some dependency problem"));
break;
case SOLVER_RULE_BEST:
if (source > 0)
- snprintf(s, STRING_SIZE - 1,
+ snprintf(s, sizeof(s) - 1,
_("cannot install the best update candidate for package %s"),
pool_solvid2str(pool, source)
);
else
- snprintf(s, STRING_SIZE - 1, _("cannot install the best candidate for the job"));
+ snprintf(s, sizeof(s) - 1, _("cannot install the best candidate for the job"));
break;
case SOLVER_RULE_RPM_NOT_INSTALLABLE:
- snprintf(s, STRING_SIZE - 1,
+ snprintf(s, sizeof(s) - 1,
_("package %s is not installable"),
pool_solvid2str(pool, source)
);
break;
case SOLVER_RULE_RPM_NOTHING_PROVIDES_DEP:
- snprintf(s, STRING_SIZE - 1,
+ snprintf(s, sizeof(s) - 1,
_("nothing provides %s needed by %s"),
pool_dep2str(pool, dep), pool_solvid2str(pool, source)
);
break;
case SOLVER_RULE_RPM_SAME_NAME:
- snprintf(s, STRING_SIZE - 1,
+ snprintf(s, sizeof(s) - 1,
_("cannot install both %s and %s"),
pool_solvid2str(pool, source), pool_solvid2str(pool, target)
);
break;
case SOLVER_RULE_RPM_PACKAGE_CONFLICT:
- snprintf(s, STRING_SIZE - 1,
+ snprintf(s, sizeof(s) - 1,
_("package %s conflicts with %s provided by %s"),
pool_solvid2str(pool, source), pool_dep2str(pool, dep),
pool_solvid2str(pool, target)
break;
case SOLVER_RULE_RPM_PACKAGE_OBSOLETES:
- snprintf(s, STRING_SIZE - 1,
+ snprintf(s, sizeof(s) - 1,
_("package %s obsoletes %s provided by %s"),
pool_solvid2str(pool, source), pool_dep2str(pool, dep),
pool_solvid2str(pool, target)
break;
case SOLVER_RULE_RPM_INSTALLEDPKG_OBSOLETES:
- snprintf(s, STRING_SIZE - 1,
+ snprintf(s, sizeof(s) - 1,
_("installed package %s obsoletes %s provided by %s"),
pool_solvid2str(pool, source), pool_dep2str(pool, dep),
pool_solvid2str(pool, target)
break;
case SOLVER_RULE_RPM_IMPLICIT_OBSOLETES:
- snprintf(s, STRING_SIZE - 1,
+ snprintf(s, sizeof(s) - 1,
_("package %s implicitely obsoletes %s provided by %s"),
pool_solvid2str(pool, source), pool_dep2str(pool, dep),
pool_solvid2str(pool, target)
break;
case SOLVER_RULE_RPM_PACKAGE_REQUIRES:
- snprintf(s, STRING_SIZE - 1,
+ snprintf(s, sizeof(s) - 1,
_("package %s requires %s, but none of the providers can be installed"),
pool_solvid2str(pool, source), pool_dep2str(pool, dep)
);
break;
case SOLVER_RULE_RPM_SELF_CONFLICT:
- snprintf(s, STRING_SIZE - 1,
+ snprintf(s, sizeof(s) - 1,
_("package %s conflicts with %s provided by itself"),
pool_solvid2str(pool, source), pool_dep2str(pool, dep)
);
break;
case SOLVER_RULE_YUMOBS:
- snprintf(s, STRING_SIZE - 1,
+ snprintf(s, sizeof(s) - 1,
_("both package %s and %s obsolete %s"),
pool_solvid2str(pool, source), pool_solvid2str(pool, target), pool_dep2str(pool, dep)
);
case SOLVER_RULE_FEATURE:
case SOLVER_RULE_LEARNT:
case SOLVER_RULE_CHOICE:
- snprintf(s, STRING_SIZE - 1, _("bad rule type"));
+ snprintf(s, sizeof(s) - 1, _("bad rule type"));
break;
}
Id rp;
Id element = 0;
while ((element = solver_next_solutionelement(solver, pakfire_problem_get_id(solution->problem), solution->id, element, &p, &rp)) != 0) {
- char line[STRING_SIZE];
+ char line[1024];
if (p == SOLVER_SOLUTION_JOB || p == SOLVER_SOLUTION_POOLJOB) {
if (p == SOLVER_SOLUTION_JOB)
Id what = solver->job.elements[rp];
// XXX pool_job2str must be localised
- snprintf(line, STRING_SIZE - 1, _("do not ask to %s"),
+ snprintf(line, sizeof(line) - 1, _("do not ask to %s"),
pool_job2str(pool, how, what, 0));
} else if (p == SOLVER_SOLUTION_INFARCH) {
Solvable* s = pool->solvables + rp;
if (pool->installed && s->repo == pool->installed)
- snprintf(line, STRING_SIZE - 1, _("keep %s despite the inferior architecture"),
+ snprintf(line, sizeof(line) - 1, _("keep %s despite the inferior architecture"),
pool_solvable2str(pool, s));
else
- snprintf(line, STRING_SIZE - 1, _("install %s despite the inferior architecture"),
+ snprintf(line, sizeof(line) - 1, _("install %s despite the inferior architecture"),
pool_solvable2str(pool, s));
} else if (p == SOLVER_SOLUTION_DISTUPGRADE) {
Solvable* s = pool->solvables + rp;
if (pool->installed && s->repo == pool->installed)
- snprintf(line, STRING_SIZE - 1, _("keep obsolete %s"),
+ snprintf(line, sizeof(line) - 1, _("keep obsolete %s"),
pool_solvable2str(pool, s));
else
- snprintf(line, STRING_SIZE - 1, _("install %s"),
+ snprintf(line, sizeof(line) - 1, _("install %s"),
pool_solvable2str(pool, s));
} else if (p == SOLVER_SOLUTION_BEST) {
Solvable* s = pool->solvables + rp;
if (pool->installed && s->repo == pool->installed)
- snprintf(line, STRING_SIZE - 1, _("keep old %s"),
+ snprintf(line, sizeof(line) - 1, _("keep old %s"),
pool_solvable2str(pool, s));
else
- snprintf(line, STRING_SIZE - 1, _("install %s despite the old version"),
+ snprintf(line, sizeof(line) - 1, _("install %s despite the old version"),
pool_solvable2str(pool, s));
} else if (p > 0 && rp == 0)
- snprintf(line, STRING_SIZE - 1, _("allow deinstallation of %s"),
+ snprintf(line, sizeof(line) - 1, _("allow deinstallation of %s"),
pool_solvid2str(pool, p));
else if (p > 0 && rp > 0)
- snprintf(line, STRING_SIZE - 1, _("allow replacement of %s with %s"),
+ snprintf(line, sizeof(line) - 1, _("allow replacement of %s with %s"),
pool_solvid2str(pool, p), pool_solvid2str(pool, rp));
else
- snprintf(line, STRING_SIZE - 1, _("bad solution element"));
+ snprintf(line, sizeof(line) - 1, _("bad solution element"));
// Save line in elements array
*elements++ = strdup(line);