]> git.decadent.org.uk Git - dak.git/commitdiff
Merge commit 'pkern/master'
authorJoerg Jaspert <joerg@debian.org>
Mon, 8 Sep 2008 19:53:11 +0000 (21:53 +0200)
committerJoerg Jaspert <joerg@debian.org>
Mon, 8 Sep 2008 19:53:11 +0000 (21:53 +0200)
* commit 'pkern/master':
  dak/check_archive.py (check_checksums): rewind the file pointer

Signed-off-by: Joerg Jaspert <joerg@debian.org>
ChangeLog
dak/check_archive.py

index d52a5c6e26ddfda29e72549e52480485c5f58b4b..c1402201f026da34c35a499018853de87a980384 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-09-08  Philipp Kern  <pkern@debian.org>
+
+       * 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  <pkern@debian.org>
 
        * daklib/utils.py (check_hash): try..except..finally only
index 93cc832c1fb0efd41748e894bf607894a20c9c5f..896ab1f546d0134eedeae6ce08501c60d3f3e877 100755 (executable)
@@ -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))