};
rpmProblem rpmProblemCreate(rpmProblemType type,
- const char * pkgNEVR,
- fnpyKey key,
- const char * dn, const char * bn,
+ const char * pkgNEVR, fnpyKey key,
const char * altNEVR,
- uint64_t number)
+ const char * str, uint64_t number)
{
rpmProblem p = xcalloc(1, sizeof(*p));
- char *t;
p->type = type;
p->key = key;
p->pkgNEVR = (pkgNEVR ? xstrdup(pkgNEVR) : NULL);
p->altNEVR = (altNEVR ? xstrdup(altNEVR) : NULL);
+ p->str1 = (str ? xstrdup(str) : NULL);
- p->str1 = NULL;
- if (dn != NULL || bn != NULL) {
- t = xcalloc(1, (dn != NULL ? strlen(dn) : 0) +
- (bn != NULL ? strlen(bn) : 0) + 1);
- p->str1 = t;
- if (dn != NULL) t = stpcpy(t, dn);
- if (bn != NULL) t = stpcpy(t, bn);
- }
return rpmProblemLink(p);
}
* @param type type of problem
* @param pkgNEVR package name
* @param key filename or python object address
- * @param dn directory name
- * @param bn file base name
* @param altNEVR related (e.g. through a dependency) package name
+ * @param str generic string attribute
* @param number generic number attribute
* @return rpmProblem
*/
rpmProblem rpmProblemCreate(rpmProblemType type,
- const char * pkgNEVR,
- fnpyKey key,
- const char * dn, const char * bn,
+ const char * pkgNEVR, fnpyKey key,
const char * altNEVR,
- uint64_t number);
+ const char * str, uint64_t number);
/** \ingroup rpmprob
* Destroy a problem item.
}
void rpmpsAppend(rpmps ps, rpmProblemType type,
- const char * pkgNEVR, fnpyKey key,
- const char * dn, const char * bn,
- const char * altNEVR, uint64_t number)
+ const char * pkgNEVR, fnpyKey key, const char * altNEVR,
+ const char * str, uint64_t number)
{
rpmProblem p = NULL;
if (ps == NULL) return;
- p = rpmProblemCreate(type, pkgNEVR, key, dn, bn, altNEVR, number);
+ p = rpmProblemCreate(type, pkgNEVR, key, altNEVR, str, number);
rpmpsAppendProblem(ps, p);
rpmProblemFree(p);
}
* @param type type of problem
* @param pkgNEVR package name
* @param key filename or python object address
- * @param dn directory name
- * @param bn file base name
* @param altNEVR related (e.g. through a dependency) package name
+ * @param str generic string attribute
* @param number generic number attribute
*/
void rpmpsAppend(rpmps ps, rpmProblemType type,
- const char * pkgNEVR,
- fnpyKey key,
- const char * dn, const char * bn,
- const char * altNEVR,
- uint64_t number);
+ const char * pkgNEVR, fnpyKey key, const char * altNEVR,
+ const char *str, uint64_t number);
/** \ingroup rpmps
* Filter a problem set.
if (te->probs == NULL)
te->probs = rpmpsCreate();
rpmpsAppend(te->probs, type, rpmteNEVRA(te), rpmteKey(te),
- str, NULL, altNEVR, number);
+ altNEVR, str, number);
}
}
case 'R': type = RPMPROB_REQUIRES; break;
}
- rpmpsAppend(te->probs, type, pkgNEVR, key, NULL, NULL, DNEVR, adding);
+ rpmpsAppend(te->probs, type, pkgNEVR, key, DNEVR, NULL, adding);
}
}