* add PackageHash tag to pisi-index that holds the binary

pisi package's sha1sum
This commit is contained in:
Faik Uygur
2006-10-17 17:44:04 +00:00
parent 13162f8d2e
commit 69890b14d2
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -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
+1
View File
@@ -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]