return (te != NULL ? te->u.removed.dboffset : 0);
}
+const char * rpmteEVR(rpmte te)
+{
+ return (te != NULL ? te->NEVR + strlen(te->name) + 1 : NULL);
+}
+
const char * rpmteNEVR(rpmte te)
{
return (te != NULL ? te->NEVR : NULL);
int rpmteDBOffset(rpmte te);
/** \ingroup rpmte
+ * Retrieve [epoch:]version-release string from transaction element.
+ * @param te transaction element
+ * @return name-version-release string
+ */
+const char * rpmteEVR(rpmte te);
+
+/** \ingroup rpmte
* Retrieve name-version-release string from transaction element.
* @param te transaction element
* @return name-version-release string
const rpmte p, const Header h)
{
rpmsenseFlags reqFlags = (RPMSENSE_LESS | RPMSENSE_EQUAL);
- const char * reqEVR;
rpmds req;
int rc;
if (p == NULL || h == NULL)
return 1;
- reqEVR = rpmteNEVR(p) + strlen(rpmteN(p)) + 1;
-
- req = rpmdsSingle(RPMTAG_REQUIRENAME, rpmteN(p), reqEVR, reqFlags);
+ req = rpmdsSingle(RPMTAG_REQUIRENAME, rpmteN(p), rpmteEVR(p), reqFlags);
rc = rpmdsNVRMatchesDep(h, req, _rpmds_nopromote);
req = rpmdsFree(req);