#1465 için başlangıç kodu..
Şu anda index içerisinde paket büyüklüğünü saklıyoruz..
This commit is contained in:
@@ -97,6 +97,7 @@ class Index(XmlFile):
|
|||||||
|
|
||||||
md = metadata.MetaData()
|
md = metadata.MetaData()
|
||||||
md.read(os.path.join(ctx.config.install_dir(), ctx.const.metadata_xml))
|
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:
|
if ctx.config.options and ctx.config.options.absolute_uris:
|
||||||
# FIXME: the name "absolute_uris" does not seem to fit below :/
|
# FIXME: the name "absolute_uris" does not seem to fit below :/
|
||||||
md.package.packageURI = os.path.realpath(path)
|
md.package.packageURI = os.path.realpath(path)
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ class Package(specfile.Package):
|
|||||||
t_DistributionRelease = [ autoxml.String, autoxml.mandatory]
|
t_DistributionRelease = [ autoxml.String, autoxml.mandatory]
|
||||||
t_Architecture = [ autoxml.String, autoxml.mandatory]
|
t_Architecture = [ autoxml.String, autoxml.mandatory]
|
||||||
t_InstalledSize = [ autoxml.Long, autoxml.mandatory]
|
t_InstalledSize = [ autoxml.Long, autoxml.mandatory]
|
||||||
|
t_PackageSize = [ autoxml.Long, autoxml.optional]
|
||||||
t_PackageURI = [ autoxml.String, autoxml.optional]
|
t_PackageURI = [ autoxml.String, autoxml.optional]
|
||||||
|
|
||||||
def decode_hook(self, node, errs, where):
|
def decode_hook(self, node, errs, where):
|
||||||
|
|||||||
Reference in New Issue
Block a user