From c0b45d5a9b783027658d7a537c4e8cdbb4a3aec4 Mon Sep 17 00:00:00 2001 From: Philipp Kern Date: Mon, 8 Sep 2008 19:51:44 +0000 Subject: [PATCH] dak/check_archive.py (check_checksums): rewind the file pointer 2008-09-08 Philipp Kern * dak/check_archive.py (check_checksums): rewind the files before the sha1sum/sha256sum checks as they got seeked by md5sum Signed-off-by: Philipp Kern --- ChangeLog | 6 ++++++ dak/check_archive.py | 2 ++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index d52a5c6e..c1402201 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-09-08 Philipp Kern + + * dak/check_archive.py (check_checksums): rewind the files + before the sha1sum/sha256sum checks as they got seeked by + md5sum + 2008-09-07 Philipp Kern * daklib/utils.py (check_hash): try..except..finally only diff --git a/dak/check_archive.py b/dak/check_archive.py index 93cc832c..896ab1f5 100755 --- a/dak/check_archive.py +++ b/dak/check_archive.py @@ -221,11 +221,13 @@ def check_checksums(): # every time we scan the archive. Yet another hack (TM) which can go away # once this is all working if db_sha1sum is not None and db_sha1sum != '': + f.seek(0) sha1sum = apt_pkg.sha1sum(f) if sha1sum != db_sha1sum: utils.warn("**WARNING** sha1sum mismatch for '%s' ('%s' [current] vs. '%s' [db])." % (filename, sha1sum, db_sha1sum)) if db_sha256sum is not None and db_sha256sum != '': + f.seek(0) sha256sum = apt_pkg.sha256sum(f) if sha256sum != db_sha256sum: utils.warn("**WARNING** sha256sum mismatch for '%s' ('%s' [current] vs. '%s' [db])." % (filename, sha256sum, db_sha256sum)) -- 2.39.2