l.a.dscfile : module documentation

Part of lp.archiveuploader

DSCFile and related.

Class representing a DSC file, which encapsulates collections of files representing a source uploaded.

Function unpack_source Unpack a source package into a temporary directory
Function cleanup_unpacked_dir Remove the directory with an unpacked source package.
Class SignableTagFile Base class for signed file verification.
Class DSCFile Models a given DSC file and its content.
Class DSCUploadedFile Represents a file referred to in a DSC.
Function findFile Find and return any file under source_dir
Function find_copyright Find and store any debian/copyright.
Function find_changelog Find and move any debian/changelog.
Function check_format_1_0_files Check that the given counts of each file type suit format 1.0.
Function check_format_3_0_native_files Check that the given counts of each file type suit format 3.0 (native).
Function check_format_3_0_quilt_files Check that the given counts of each file type suit format 3.0 (native).
def unpack_source(dsc_filepath):
Unpack a source package into a temporary directory
Parametersdsc_filepathPath to the dsc file
ReturnsPath to the temporary directory with the unpacked sources
def cleanup_unpacked_dir(unpacked_dir):
Remove the directory with an unpacked source package.
Parametersunpacked_dirPath to the directory.
def findFile(source_dir, filename):
Find and return any file under source_dir
Parameterssource_fileThe directory where the source was extracted
source_dirThe directory where the source was extracted.
ReturnsThe full path of the file, else return None if the file is not found.
def find_copyright(source_dir, logger):
Find and store any debian/copyright.
Parameterssource_dirThe directory where the source was extracted.
loggerA logger object for debug output.
ReturnsContents of copyright file
def find_changelog(source_dir, logger):
Find and move any debian/changelog.

This function finds the changelog file within the source package. The changelog file is later uploaded to the librarian by DSCFile.storeInDatabase().

Parameterssource_dirThe directory where the source was extracted.
loggerA logger object for debug output.
ReturnsChangelog contents
def check_format_1_0_files(filename, file_type_counts, component_counts, component_signature_counts, bzip2_count, xz_count):
Check that the given counts of each file type suit format 1.0.

A 1.0 source must be native (with only one tar.gz), or have an orig.tar.gz and a diff.gz. It cannot use bzip2 or xz compression. If it has an orig.tar.gz, it may have an orig.tar.gz.asc signature.

def check_format_3_0_native_files(filename, file_type_counts, component_counts, component_signature_counts, bzip2_count, xz_count):
Check that the given counts of each file type suit format 3.0 (native).

A 3.0 (native) source must have only one tar.*. Any of gzip, bzip2, and xz compression are permissible.

def check_format_3_0_quilt_files(filename, file_type_counts, component_counts, component_signature_counts, bzip2_count, xz_count):
Check that the given counts of each file type suit format 3.0 (native).

A 3.0 (quilt) source must have exactly one orig.tar.*, one debian.tar.*, and at most one orig-COMPONENT.tar.* for each COMPONENT. Any of gzip, bzip2, and xz compression are permissible. It may have orig.tar.*.asc or orig-COMPONENT.tar.* signatures.

API Documentation for Launchpad, generated by pydoctor at 2018-08-20 00:00:04.