* changes the way the hashkey for the cache is generated. (The original
version just used rpm.RPMTAG_SIGMD5, which was the same for the same
signed and unsigned package. However, this lead to a wrong checksum
ending up in the metadata.)
Christoph Thiel <cthiel@suse.de>
if not self.options['cache']:
return getChecksum(self.options['sumtype'], fo)
- key = "".join([hex(ord(x))[2:].zfill(2)
- for x in tuple(self.hdr[rpm.RPMTAG_SIGMD5])])
+ t = []
+ t.append("".join(self.hdr[rpm.RPMTAG_SIGGPG]))
+ t.append("".join(self.hdr[rpm.RPMTAG_SIGPGP]))
+ t.append("".join(self.hdr[rpm.RPMTAG_HDRID]))
+ key = md5.new("".join(t)).hexdigest()
+
csumtag = '%s-%s' % (self.hdr['name'] , key)
csumfile = '%s/%s' % (self.options['cachedir'], csumtag)
if os.path.exists(csumfile) and self.mtime <= os.stat(csumfile)[8]: