The following patch on top of the patch in comment #3 seems to be needed:
--- smart/cache.py 2009-02-20 12:34:05 +0000 +++ smart/cache.py 2009-04-16 12:20:41.000000000 +0200 @@ -211,7 +211,7 @@ raise Error, _("Invalid MD5 (expected %s, got %s)") % \ (filemd5, lfilemd5) else: - filesha256 = item.getInfo(uncompprefix+"sha256") + filesha256 = self.getSHA256(url) if filesha256: try: from hashlib import sha256 @@ -225,7 +225,6 @@ if lfilesha256 != filesha256: raise Error, _("Invalid SHA256 (expected %s, got %s)") % \ (filesha256, lfilesha256) - return except ImportError: pass filesha = self.getSHA(url) --- smart/fetcher.py 2009-02-20 13:26:02 +0000 +++ smart/fetcher.py 2009-04-16 12:20:26.000000000 +0200 @@ -398,7 +398,6 @@ if lfilesha256 != filesha256: raise Error, _("Invalid SHA256 (expected %s, got %s)") % \ (filesha256, lfilesha256) - return except ImportError: pass filesha = item.getInfo(uncompprefix+"sha")
The resulting patch against 1.2 looks like the attached one.
The following patch on top of the patch in comment #3 seems to be needed:
--- smart/cache.py 2009-02-20 12:34:05 +0000
raise Error, _("Invalid MD5 (expected %s, got %s)") % \
( filemd5, lfilemd5) uncompprefix+ "sha256" )
try:
from hashlib import sha256
if lfilesha256 != filesha256:
raise Error, _("Invalid SHA256 (expected %s, got %s)") % \
(filesha256, lfilesha256)
except ImportError:
pass
filesha = self.getSHA(url)
if lfilesha256 != filesha256:
raise Error, _("Invalid SHA256 (expected %s, got %s)") % \
(filesha256, lfilesha256)
except ImportError:
pass
filesha = item.getInfo( uncompprefix+ "sha")
+++ smart/cache.py 2009-04-16 12:20:41.000000000 +0200
@@ -211,7 +211,7 @@
else:
- filesha256 = item.getInfo(
+ filesha256 = self.getSHA256(url)
if filesha256:
@@ -225,7 +225,6 @@
- return
--- smart/fetcher.py 2009-02-20 13:26:02 +0000
+++ smart/fetcher.py 2009-04-16 12:20:26.000000000 +0200
@@ -398,7 +398,6 @@
- return
The resulting patch against 1.2 looks like the attached one.