diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2009-12-17 16:10:37 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2009-12-17 16:10:37 +0200 |
commit | c2e1c048b3341824f9f0e50f2c9e2d8598891f9e (patch) | |
tree | a8a362571532dd70d01fcc0b1c18ddb908f3f891 /lib/rpmte.c | |
parent | e5f7b3264cb03d03ceb6e2100c117c7f37e01e9f (diff) | |
download | librpm-tizen-c2e1c048b3341824f9f0e50f2c9e2d8598891f9e.tar.gz librpm-tizen-c2e1c048b3341824f9f0e50f2c9e2d8598891f9e.tar.bz2 librpm-tizen-c2e1c048b3341824f9f0e50f2c9e2d8598891f9e.zip |
Fix ts element package file size on large packages
- RPMTAG_SIGSIZE is limited to 4GB, grab RPMTAG_LONGSIGSIZE through
headerGetNumber() grabs the correct tag automatically and simplifies
the code a bit
Diffstat (limited to 'lib/rpmte.c')
-rw-r--r-- | lib/rpmte.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/rpmte.c b/lib/rpmte.c index 4254ffab9..1684aa2f0 100644 --- a/lib/rpmte.c +++ b/lib/rpmte.c @@ -307,17 +307,12 @@ rpmte rpmteNew(const rpmts ts, Header h, int dboffset) { rpmte p = xcalloc(1, sizeof(*p)); - uint32_t *ep; - struct rpmtd_s size; p->type = type; addTE(ts, p, h, key, relocs); switch (type) { case TR_ADDED: - headerGet(h, RPMTAG_SIGSIZE, &size, HEADERGET_DEFAULT); - if ((ep = rpmtdGetUint32(&size))) { - p->pkgFileSize += 96 + 256 + *ep; - } + p->pkgFileSize = headerGetNumber(h, RPMTAG_LONGSIGSIZE) + 96 + 256; break; case TR_REMOVED: /* nothing to do */ |