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:
+2
-8
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user