Search
j0ke.net Open Build Service
>
Projects
>
SUSE
:
Manager
:
1.2
>
createrepo
> createrepo-0.4.11-hashfix.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File createrepo-0.4.11-hashfix.patch of Package createrepo
--- dumpMetadata.py 2008-12-03 14:08:45.000000000 +0600 +++ dumpMetadata.py 2009-01-21 18:13:17.000000000 +0600 @@ -22,8 +22,7 @@ import os import rpm import exceptions -import md5 -import sha +import hashlib import types import struct import re @@ -124,9 +123,9 @@ fo = open(file, 'rb', CHUNK) if sumtype == 'md5': - sum = md5.new() + sum = hashlib.md5() elif sumtype == 'sha': - sum = sha.new() + sum = hashlib.sha1() else: raise MDError, 'Error Checksumming file, wrong checksum type %s' % sumtype chunk = fo.read @@ -609,7 +608,7 @@ if type(self.hdr[rpm.RPMTAG_SHA1HEADER]) is not types.NoneType: t.append("".join(self.hdr[rpm.RPMTAG_SHA1HEADER])) - key = md5.new("".join(t)).hexdigest() + key = hashlib.md5("".join(t)).hexdigest() csumtag = '%s-%s-%s-%s' % (os.path.basename(self.relativepath), self.hdr[rpm.RPMTAG_SHA1HEADER],