From: Seth Vidal Date: Thu, 22 Jan 2009 21:22:20 +0000 (-0500) Subject: get rid of the md5 badness - use yum's Checksum class so we don't have to deal X-Git-Tag: upstream/0.9.9~90 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5af6824631dfda17d0817343f42583129c0d0d8b;p=tools%2Fcreaterepo.git get rid of the md5 badness - use yum's Checksum class so we don't have to deal with python 2.4 vs 2.6isms --- diff --git a/createrepo/yumbased.py b/createrepo/yumbased.py index f4ff87c..2e23f9d 100644 --- a/createrepo/yumbased.py +++ b/createrepo/yumbased.py @@ -19,7 +19,6 @@ import os import rpm import types import re -import md5 from yum.packages import YumLocalPackage from yum.Errors import * @@ -60,7 +59,9 @@ class CreateRepoPackage(YumLocalPackage): if type(self.hdr[rpm.RPMTAG_HDRID]) is not types.NoneType: t.append("".join(self.hdr[rpm.RPMTAG_HDRID])) - key = md5.new("".join(t)).hexdigest() + kcsum = misc.Checksums() + kcsum.update("".join(t)) + key = kcsum.hexdigest() csumtag = '%s-%s-%s-%s' % (os.path.basename(self.localpath), key, self.size, self.filetime)