}
if (!valid) {
- if (p->probs == NULL) {
- p->probs = rpmpsCreate();
- }
- rpmpsAppend(p->probs, RPMPROB_BADRELOCATE,
- rpmteNEVRA(p), rpmteKey(p),
- p->relocs[i].oldPath, NULL, NULL, 0);
+ rpmteAddProblem(p, RPMPROB_BADRELOCATE,
+ p->relocs[i].oldPath, NULL, NULL, 0);
}
} else {
p->relocs[i].newPath = NULL;
return te ? te->probs : NULL;
}
+void rpmteAddProblem(rpmte te, rpmProblemType type,
+ const char *dn, const char *bn,
+ const char *altNEVR, uint64_t number)
+{
+ if (te != NULL) {
+ if (te->probs == NULL)
+ te->probs = rpmpsCreate();
+ rpmpsAppend(te->probs, type, rpmteNEVRA(te), rpmteKey(te),
+ dn, bn, altNEVR, number);
+ }
+}
+
const char * rpmteTypeString(rpmte te)
{
switch(rpmteType(te)) {
rpmps rpmteProblems(rpmte te);
RPM_GNUC_INTERNAL
+void rpmteAddProblem(rpmte te, rpmProblemType type,
+ const char *dn, const char *bn,
+ const char *altNEVR, uint64_t number);
+
+RPM_GNUC_INTERNAL
const char * rpmteTypeString(rpmte te);
RPM_GNUC_INTERNAL