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. */
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);
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);
RPM_GNUC_INTERNAL
void rpmRelocateFileList(rpmRelocation *relocs, int numRelocations, rpmfs fs, Header h);
+/** \ingroup rpmte
+ * Retrieve size in bytes of package header.
+ * @param te transaction element
+ * @return size in bytes of package file.
+ */
+RPM_GNUC_INTERNAL
+rpm_loff_t rpmteHeaderSize(rpmte te);
+
#endif /* _RPMTE_INTERNAL_H */