* add PackageHash tag to pisi-index that holds the binary
pisi package's sha1sum
This commit is contained in:
@@ -129,6 +129,7 @@ class Index(XmlFile):
|
||||
package = Package(path, 'r')
|
||||
md = package.get_metadata()
|
||||
md.package.packageSize = os.path.getsize(path)
|
||||
md.package.packageHash = util.sha1_file(path)
|
||||
if ctx.config.options and ctx.config.options.absolute_urls:
|
||||
md.package.packageURI = os.path.realpath(path)
|
||||
else: # create relative path by default
|
||||
|
||||
@@ -43,6 +43,7 @@ class Package(specfile.Package):
|
||||
t_Architecture = [ autoxml.String, autoxml.mandatory]
|
||||
t_InstalledSize = [ autoxml.Long, autoxml.mandatory]
|
||||
t_PackageSize = [ autoxml.Long, autoxml.optional]
|
||||
t_PackageHash = [ autoxml.String, autoxml.optional, "SHA1Sum" ]
|
||||
t_PackageURI = [ autoxml.String, autoxml.optional]
|
||||
t_PackageFormat = [ autoxml.String, autoxml.optional]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user