aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.xs
diff options
context:
space:
mode:
authorPer Øyvind Karlsen <peroyvind@mandriva.org>2012-08-03 19:54:03 +0000
committerPer Øyvind Karlsen <peroyvind@mandriva.org>2012-08-03 19:54:03 +0000
commitff211b06781a086bdfec6b65ee482840ba71bdad (patch)
treea33827963ee32697eab3c2b916d745ba1ceaa9f2 /URPM.xs
parent0818d16a31f25a729aa99dad9ffa7cf754e513ab (diff)
downloadperl-URPM-ff211b06781a086bdfec6b65ee482840ba71bdad.tar
perl-URPM-ff211b06781a086bdfec6b65ee482840ba71bdad.tar.gz
perl-URPM-ff211b06781a086bdfec6b65ee482840ba71bdad.tar.bz2
perl-URPM-ff211b06781a086bdfec6b65ee482840ba71bdad.tar.xz
perl-URPM-ff211b06781a086bdfec6b65ee482840ba71bdad.zip
~fix filesize computation
Diffstat (limited to 'URPM.xs')
-rw-r--r--URPM.xs5
1 files changed, 2 insertions, 3 deletions
diff --git a/URPM.xs b/URPM.xs
index 1bab88c..2ffdd58 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -359,9 +359,8 @@ get_fullname_parts(URPM__Package pkg, char **name, int *epoch, char **version, c
}
static size_t
-get_filesize(Header h) {
- /* XXX: 24 is padding..? */
- return rpmpkgSizeof("Lead", NULL) + 24 + headerSizeof(h) + get_int(h, RPMTAG_ARCHIVESIZE);
+get_filesize(const Header h) {
+ return get_int(h, RPMTAG_SIGSIZE) + 440; /* 440 is the rpm header size (?) empirical, but works */
}
static int