]> git.decadent.org.uk Git - dak.git/blobdiff - daklib/utils.py
Merge commit 'pkern/master'
[dak.git] / daklib / utils.py
index 03135e72e4a58fe99dc9ad05c8506c707957d55f..7979344dd3271be2f31ecebbf87ce2768be552e7 100755 (executable)
@@ -267,7 +267,7 @@ def check_hash(where, files, hashname, hashfunc):
                         where))
             except CantOpenError:
                 # TODO: This happens when the file is in the pool.
-                warn("Cannot open file %s" % f)
+                warn("Cannot open file %s" % f)
                 continue
         finally:
             if file_handle:
@@ -395,11 +395,15 @@ def parse_checksums(where, files, manifest, hashname):
             break
         hash, size, file = line.strip().split(' ')
         if not files.has_key(file):
-            rejmsg.append("%s: not present in files but in checksums-%s in %s" %
-                (file, hashname, where))
+        # TODO: check for the file's entry in the original files dict, not
+        # the one modified by (auto)byhand and other weird stuff
+        #    rejmsg.append("%s: not present in files but in checksums-%s in %s" %
+        #        (file, hashname, where))
+            continue
         if not files[file]["size"] == size:
             rejmsg.append("%s: size differs for files and checksums-%s entry "\
                 "in %s" % (file, hashname, where))
+            continue
         files[file][hash_key(hashname)] = hash
     for f in files.keys():
         if not files[f].has_key(hash_key(hashname)):