Eliminate the umphteen deprecated N(E)VR(A) etc getter APIs

These have been deprecated since 2009, time to let go.
This commit is contained in:
Panu Matilainen 2016-10-24 12:15:55 +03:00
parent e6f0fb7b28
commit 5d31bfe53d
2 changed files with 0 additions and 121 deletions

View File

@ -324,65 +324,6 @@ int headerNext(HeaderIterator hi, rpmtd td);
*/
rpmTagVal headerNextTag(HeaderIterator hi);
/** \ingroup header
* Return name, version, release strings from header.
* @param h header
* @retval *np name pointer (or NULL)
* @retval *vp version pointer (or NULL)
* @retval *rp release pointer (or NULL)
* @return 0 always
*/
RPM_GNUC_DEPRECATED
int headerNVR(Header h,
const char ** np,
const char ** vp,
const char ** rp);
/** \ingroup header
* Return name, epoch, version, release, arch strings from header.
* @param h header
* @retval *np name pointer (or NULL)
* @retval *ep epoch pointer (or NULL)
* @retval *vp version pointer (or NULL)
* @retval *rp release pointer (or NULL)
* @retval *ap arch pointer (or NULL)
* @return 0 always
*/
RPM_GNUC_DEPRECATED
int headerNEVRA(Header h,
const char ** np,
uint32_t ** ep,
const char ** vp,
const char ** rp,
const char ** ap);
/** \ingroup header
* Return (malloc'd) header name-version-release string.
* @param h header
* @retval np name tag value
* @return name-version-release string
*/
RPM_GNUC_DEPRECATED
char * headerGetNEVR(Header h, const char ** np );
/** \ingroup header
* Return (malloc'd) header name-version-release.arch string.
* @param h header
* @retval np name tag value
* @return name-version-release string
*/
RPM_GNUC_DEPRECATED
char * headerGetNEVRA(Header h, const char ** np );
/* \ingroup header
* Return (malloc'd) header (epoch:)version-release string.
* @param h header
* @retval np name tag value (or NULL)
* @return (epoch:)version-release string
*/
RPM_GNUC_DEPRECATED
char * headerGetEVR(Header h, const char **np);
/** \ingroup header
* Return any non-array tag from header, converted to string
* @param h header
@ -407,14 +348,6 @@ const char * headerGetString(Header h, rpmTagVal tag);
*/
uint64_t headerGetNumber(Header h, rpmTagVal tag);
/** \ingroup header
* Return header color.
* @param h header
* @return header color
*/
RPM_GNUC_DEPRECATED
rpm_color_t headerGetColor(Header h);
/** \ingroup header
* Check if header is a source or binary package header
* @param h header

View File

@ -10,60 +10,6 @@
#include "debug.h"
static int NEVRA(Header h, const char **np,
uint32_t **ep, const char **vp, const char **rp,
const char **ap)
{
if (np) *np = headerGetString(h, RPMTAG_NAME);
if (vp) *vp = headerGetString(h, RPMTAG_VERSION);
if (rp) *rp = headerGetString(h, RPMTAG_RELEASE);
if (ap) *ap = headerGetString(h, RPMTAG_ARCH);
if (ep) {
struct rpmtd_s td;
headerGet(h, RPMTAG_EPOCH, &td, HEADERGET_DEFAULT);
*ep = rpmtdGetUint32(&td);
}
return 0;
}
int headerNVR(Header h, const char **np, const char **vp, const char **rp)
{
return NEVRA(h, np, NULL, vp, rp, NULL);
}
int headerNEVRA(Header h, const char **np,
uint32_t **ep, const char **vp, const char **rp,
const char **ap)
{
return NEVRA(h, np, ep, vp, rp, ap);
}
static char *getNEVRA(Header h, rpmTag tag, const char **np)
{
if (np) *np = headerGetString(h, RPMTAG_NAME);
return headerGetAsString(h, tag);
}
char * headerGetNEVR(Header h, const char ** np)
{
return getNEVRA(h, RPMTAG_NEVR, np);
}
char * headerGetNEVRA(Header h, const char ** np)
{
return getNEVRA(h, RPMTAG_NEVRA, np);
}
char * headerGetEVR(Header h, const char ** np)
{
return getNEVRA(h, RPMTAG_EVR, np);
}
rpm_color_t headerGetColor(Header h)
{
return headerGetNumber(h, RPMTAG_HEADERCOLOR);
}
int headerIsSource(Header h)
{
return (!headerIsEntry(h, RPMTAG_SOURCERPM));