From 2507fc038863dfdff4a5113b907ca4de5bb296ef Mon Sep 17 00:00:00 2001 From: Faik Uygur Date: Fri, 2 Mar 2007 15:02:37 +0000 Subject: [PATCH] merge fix for bug #4834 by gurer. the right way to calculate installedsize is to iterate through self.files of the current package. A source package may produce multiple packages as in skim-tables src package. Iterating through package.files ( s of pspec.xml) and calculating the size with util.dir_size is not the right approach. Some files that are in other produced packages may also be added to an unrelated package's - that actually has not that file - in its size calculation approach. --- pisi/build.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/pisi/build.py b/pisi/build.py index 0db8791a..e68a0c9f 100644 --- a/pisi/build.py +++ b/pisi/build.py @@ -569,14 +569,8 @@ class Builder: metadata.package.packageFormat = ctx.get_option('package_format') size = 0 - if package.debug_package: - d = self.pkg_debug_dir() - else: - d = self.pkg_install_dir() - - for path in package.files: - for p in glob.glob(util.join_path(d, path.path)): - size += util.dir_size(p) + for fileinfo in self.files.list: + size += fileinfo.size metadata.package.installedSize = size