summaryrefslogtreecommitdiff
path: root/lib/rpmte.c
diff options
context:
space:
mode:
authorFlorian Festi <ffesti@redhat.com>2010-02-02 11:12:07 +0100
committerFlorian Festi <ffesti@redhat.com>2010-02-05 12:38:56 +0100
commitc3d610926f96da71ed5fa40e5d50a83b5aa8f93b (patch)
treebb6eaf1288194c1a41008e8b484e56d1c9963f95 /lib/rpmte.c
parent16b94706e0a2ebed728389d0166a910eea5a2b7c (diff)
downloadlibrpm-tizen-c3d610926f96da71ed5fa40e5d50a83b5aa8f93b.tar.gz
librpm-tizen-c3d610926f96da71ed5fa40e5d50a83b5aa8f93b.tar.bz2
librpm-tizen-c3d610926f96da71ed5fa40e5d50a83b5aa8f93b.zip
Add rpmteHeaderSize
Diffstat (limited to 'lib/rpmte.c')
-rw-r--r--lib/rpmte.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/rpmte.c b/lib/rpmte.c
index b09556cd1..ed07ec5cf 100644
--- a/lib/rpmte.c
+++ b/lib/rpmte.c
@@ -51,6 +51,7 @@ struct rpmte_s {
rpm_color_t color; /*!< Color bit(s) from package dependencies. */
rpm_loff_t pkgFileSize; /*!< No. of bytes in package file (approx). */
+ rpm_loff_t headerSize; /*!< No. of bytes in package header */
fnpyKey key; /*!< (TR_ADDED) Retrieval key. */
rpmRelocation * relocs; /*!< (TR_ADDED) Payload file relocations. */
@@ -252,6 +253,7 @@ static void addTE(rpmte p, Header h, fnpyKey key, rpmRelocation * relocs)
p->fd = NULL;
p->pkgFileSize = 0;
+ p->headerSize = headerSizeof(h, HEADER_MAGIC_NO);
p->this = rpmdsThis(h, RPMTAG_PROVIDENAME, RPMSENSE_EQUAL);
p->provides = rpmdsNew(h, RPMTAG_PROVIDENAME, 0);
@@ -401,6 +403,10 @@ rpm_loff_t rpmtePkgFileSize(rpmte te)
return (te != NULL ? te->pkgFileSize : 0);
}
+rpm_loff_t rpmteHeaderSize(rpmte te) {
+ return (te != NULL ? te->headerSize : 0);
+}
+
rpmte rpmteParent(rpmte te)
{
return (te != NULL ? te->parent : NULL);