- # Ensure the changes filename matches it's contents.
-
- base_filename = os.path.basename(filename);
- m = re_is_changes.match(base_filename);
- # source package name
- if m:
- file_source = m.group(1);
- if changes["source"] != file_source:
- reject("package name part of changes filename (%s) does not match source field (%s) in the changes file." % (file_source, changes["source"]));
- # source version
- file_version = m.group(2);
- if changes["chopversion"] != file_version:
- reject("version part of changes filename (%s) does not match version field (%s) in the changes file." % (file_version, changes["chopversion"]));
- else:
- reject("invalid changes filename '%s'." % (filename));
-
- # But ... we can't check architecture because there's no
- # established policy or practice on how to handle
- # multi-architecture uploads. Instead we check what we can and
- # reject if there's a changes file of the same name already in one