diff --git a/pisi/index.py b/pisi/index.py index 0e275412..d6be339c 100644 --- a/pisi/index.py +++ b/pisi/index.py @@ -97,6 +97,7 @@ class Index(XmlFile): md = metadata.MetaData() md.read(os.path.join(ctx.config.install_dir(), ctx.const.metadata_xml)) + md.package.packageSize = os.path.getsize(path) if ctx.config.options and ctx.config.options.absolute_uris: # FIXME: the name "absolute_uris" does not seem to fit below :/ md.package.packageURI = os.path.realpath(path) diff --git a/pisi/metadata.py b/pisi/metadata.py index 30935855..6ec345f4 100644 --- a/pisi/metadata.py +++ b/pisi/metadata.py @@ -47,6 +47,7 @@ class Package(specfile.Package): t_DistributionRelease = [ autoxml.String, autoxml.mandatory] t_Architecture = [ autoxml.String, autoxml.mandatory] t_InstalledSize = [ autoxml.Long, autoxml.mandatory] + t_PackageSize = [ autoxml.Long, autoxml.optional] t_PackageURI = [ autoxml.String, autoxml.optional] def decode_hook(self, node, errs, where):