X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fprocess_unchecked.py;h=5884db181ab6bf302a6a177e5ee8f6a1d06e29ab;hb=4b5e93c1a14c6f34dd7b7e5ac31e0b5d50054b1f;hp=3354a5774c91f4a23fe28ad42a2d2edc195c25ba;hpb=16c6fc6bd73e2b86621464225e48bd7cfb633004;p=dak.git diff --git a/dak/process_unchecked.py b/dak/process_unchecked.py index 3354a577..5884db18 100755 --- a/dak/process_unchecked.py +++ b/dak/process_unchecked.py @@ -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,14 @@ 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) + utils.check_hash(".changes", files, "md5", apt_pkg.md5sum) + utils.check_size(".changes", files) + utils.check_hash(".dsc", dsc_files, "md5", apt_pkg.md5sum) + utils.check_size(".dsc", dsc_files) # 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) ################################################################################ @@ -1055,8 +1050,6 @@ def check_signed_by_key(): for si in q.getresult(): if si[0] not in source_ids: source_ids.append(si[0]) - print "source_ids: %s" % (",".join([str(x) for x in source_ids])) - is_nmu = 1 for si in source_ids: is_nmu = 1