+ fs = utils.build_file_list(changes, 0, "checksums-%s" % h, h)
+ if o:
+ create_hash(fs, h, f, files)
+ else:
+ check_hash(".changes %s" % (h), fs, h, f, files)
+ except NoFilesFieldError:
+ reject("No Checksums-%s: field in .changes" % (h))
+ except UnknownFormatError, format:
+ reject("%s: unknown format of .changes" % (format))
+ except ParseChangesError, line:
+ reject("parse error for Checksums-%s in .changes, can't grok: %s." % (h, line))
+
+ if "source" not in changes["architecture"]: continue
+
+ try:
+ fs = utils.build_file_list(dsc, 1, "checksums-%s" % h, h)
+ if o:
+ create_hash(fs, h, f, dsc_files)
+ else:
+ check_hash(".dsc %s" % (h), fs, h, f, dsc_files)
+ except UnknownFormatError, format:
+ reject("%s: unknown format of .dsc" % (format))
+ except NoFilesFieldError:
+ reject("No Checksums-%s: field in .dsc" % (h))
+ except ParseChangesError, line:
+ reject("parse error for Checksums-%s in .dsc, can't grok: %s." % (h, line))
+
+################################################################################
+
+def create_hash (lfiles, key, testfn, basedict = None):
+ for f in lfiles.keys():
+ try:
+ file_handle = utils.open_file(f)
+ except CantOpenError: