Code review comment for lp:~wgrant/launchpad/distroseries-source-format-selection-part1

Revision history for this message
William Grant (wgrant) wrote :

This is hopefully the second last of my Debian source format 3.0 branches. It has minimal 3.0-specific changes, as it mainly refactoring to support the new file types and multiple formats.

Note that the sample data changes are all from schema changes in previous branches, with the exception of the 'INSERT INTO sourcepackageformatselection' lines which are new (they permit the 1.0 format in all series in the sample data).

The main changes are:

Making way for new files (new compression algorithms and completely new file types):
 - Renamed SourcePackageFileType.ORIG to ORIG_TARBALL, and SPFT.TARBALL to NATIVE_TARBALL, as there will be other kinds of orig and tarball soon.
 - Isolated extension matching on source files into determine_source_file_type.

Adding multiple source format support to archiveuploader:
 - Removed most of the checks from NU._check_binaryful_consistency, since we cannot make many assertions until we know the DSC format.
 - Extended DSCFile.checkFiles to perform the checks that NU._check_binaryful_consistency used have, but in a more extensible manner.

Forbidding uploads and copies of sources to series without appropriate format support:
 - Added the SourcePackageFormat enum with 1.0, 3.0 (quilt) and 3.0 (native) formats.
 - Added (I)SourcePackageFormatSelection, which uses a DB table added late in 3.1.10.
 - Added DB permissions for SPFS.
 - Added (I)DistroSeries.{permitSourcePackageFormat,isSourceFormatPermitted} to allow manipulation and verification of allowed formats.
 - Extended DS._copy_component_and_section_selections to also copy SourcePackageFormatSelections during intialiseFromParent.
 - In CopyChecker.checkCopy, reject a copy if the target does not support the source format.
 - Replace the self.format != "1.0" check in archiveuploader with a check that the format is supported by the target series.

« Back to merge proposal