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 (<Path> 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.
This commit is contained in:
Faik Uygur
2007-03-02 15:02:37 +00:00
parent 42d5dd7c0e
commit 2507fc0388
+2 -8
View File
@@ -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