diff options
author | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2012-08-03 19:54:03 +0000 |
---|---|---|
committer | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2012-08-03 19:54:03 +0000 |
commit | ff211b06781a086bdfec6b65ee482840ba71bdad (patch) | |
tree | a33827963ee32697eab3c2b916d745ba1ceaa9f2 | |
parent | 0818d16a31f25a729aa99dad9ffa7cf754e513ab (diff) | |
download | perl-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
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | URPM.pm | 2 | ||||
-rw-r--r-- | URPM.xs | 5 |
3 files changed, 7 insertions, 4 deletions
@@ -1,3 +1,7 @@ +Version 4.37.1 - 3 August 2012, by Per Øyvind Karlsen + +- ~fix filesize computation + Version 4.37 - 24 July 2011, by Per Øyvind Karlsen - fix URPM::Resolve::fullname_parts() to also work without disttag & distepoch @@ -11,7 +11,7 @@ use URPM::Resolve; use URPM::Signature; our @ISA = qw(DynaLoader); -our $VERSION = '4.37'; +our $VERSION = '4.37.1'; URPM->bootstrap($VERSION); @@ -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 |