]> git.decadent.org.uk Git - dak.git/blobdiff - dak/process_unchecked.py
Revert "revert all my stupid commits, we'll try this again later when we have a test...
[dak.git] / dak / process_unchecked.py
index 3354a5774c91f4a23fe28ad42a2d2edc195c25ba..123fd9f37e7e6f7316300f8b98c90452b12a086c 100755 (executable)
@@ -630,11 +630,11 @@ def check_files():
 
             # Check the md5sum & size against existing files (if any)
             files[f]["pool name"] = utils.poolify (changes["source"], files[f]["component"])
-            files_id = database.get_files_id(files[f]["pool name"] + f, files[f]["size"], files[f]["md5sum"], files[f]["sha1sum"], files[f]["sha256sum"], files[f]["location id"])
+            files_id = database.get_files_id(files[f]["pool name"] + f, files[f]["size"], files[f]["md5sum"], files[f]["location id"])
             if files_id == -1:
                 reject("INTERNAL ERROR, get_files_id() returned multiple matches for %s." % (f))
             elif files_id == -2:
-                reject("md5sum, sha1sum, sha256sum and/or size mismatch on existing copy of %s." % (f))
+                reject("md5sum and/or size mismatch on existing copy of %s." % (f))
             files[f]["files id"] = files_id
 
             # Check for packages that have moved from one component to another
@@ -919,19 +919,12 @@ def check_urgency ():
 ################################################################################
 
 def check_hashes ():
-    # Make sure we recognise the format of the Files: field
-    format = changes.get("format", "0.0").split(".",1)
-    if len(format) == 2:
-        format = int(format[0]), int(format[1])
-    else:
-        format = int(float(format[0])), 0
-
     utils.check_hash(".changes", files, "md5sum", apt_pkg.md5sum)
     utils.check_hash(".dsc", dsc_files, "md5sum", apt_pkg.md5sum)
 
     # This is stupid API, but it'll have to do for now until
     # we actually have proper abstraction
-    for m in utils.ensure_hashes(Upload):
+    for m in utils.ensure_hashes(changes, dsc, files, dsc_files):
         reject(m)
 
 ################################################################################