summaryrefslogtreecommitdiff
path: root/rpmdb
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2008-04-09 10:32:44 +0300
committerPanu Matilainen <pmatilai@redhat.com>2008-04-09 10:32:44 +0300
commit99322592d79cda46ad4e8f62d9613e2e588dc523 (patch)
tree50ff5ba444b724db67dec28178a898bb49cdb123 /rpmdb
parent2cfe2d3a3b73889584a0b165b07e8088a312e5c0 (diff)
downloadrpm-99322592d79cda46ad4e8f62d9613e2e588dc523.tar.gz
rpm-99322592d79cda46ad4e8f62d9613e2e588dc523.tar.bz2
rpm-99322592d79cda46ad4e8f62d9613e2e588dc523.zip
Make headerNEVRA() actually return epoch too
- ...but epoch is an integer type in headers, change proto to match that
Diffstat (limited to 'rpmdb')
-rw-r--r--rpmdb/hdrNVR.c7
-rw-r--r--rpmdb/header.h2
2 files changed, 7 insertions, 2 deletions
diff --git a/rpmdb/hdrNVR.c b/rpmdb/hdrNVR.c
index e9d46ef5f..a7e752198 100644
--- a/rpmdb/hdrNVR.c
+++ b/rpmdb/hdrNVR.c
@@ -33,7 +33,7 @@ int headerNVR(Header h, const char **np, const char **vp, const char **rp)
}
int headerNEVRA(Header h, const char **np,
- const char **ep, const char **vp, const char **rp,
+ int32_t **ep, const char **vp, const char **rp,
const char **ap)
{
rpmTagType type;
@@ -45,6 +45,11 @@ int headerNEVRA(Header h, const char **np,
&& type == RPM_STRING_TYPE && count == 1))
*ap = NULL;
}
+ if (ep) {
+ if (!(headerGetEntry(h, RPMTAG_EPOCH, &type, (rpm_data_t *) ep, &count)
+ && type == RPM_INT32_TYPE && count == 1))
+ *ep = NULL;
+ }
return 0;
}
diff --git a/rpmdb/header.h b/rpmdb/header.h
index 0c6325546..ab6f165e5 100644
--- a/rpmdb/header.h
+++ b/rpmdb/header.h
@@ -490,7 +490,7 @@ int headerNVR(Header h,
*/
int headerNEVRA(Header h,
const char ** np,
- const char ** ep,
+ int32_t ** ep,
const char ** vp,
const char ** rp,
const char ** ap);