l.a.n.PackageUploadFile(NascentUploadFile) : class documentation

Part of lp.archiveuploader.nascentuploadfile View In Hierarchy

Known subclasses: lp.archiveuploader.buildinfofile.BuildInfoFile, lp.archiveuploader.nascentuploadfile.BaseBinaryUploadFile, lp.archiveuploader.nascentuploadfile.SourceUploadFile

Base class to model sources and binary files contained in a upload.
Method __init__ Check presence of the component and section from an uploaded_file.
Method component Return an IComponent for self.component.name.
Method section Return an ISection for self.section_name.
Method checkBuild Check the status of the build this file is part of.
Method extractUserDefinedFields Extract the user defined fields out of a control file list.

Inherited from NascentUploadFile:

Method content_type The content type for this file.
Method filename Return the NascentUpload filename.
Method dirname Return the NascentUpload filename.
Method exists_on_disk Whether or not the file is present on disk.
Method storeInDatabase Implement this to store this representation in the database.
Method verify Implemented locally.
Method checkNameIsTaintFree Verify if the filename contains forbidden characters.
Method checkSizeAndCheckSum Check the size and checksums of the nascent file.
def __init__(self, filepath, md5, size, component_and_section, priority_name, package, version, changes, policy, logger):
Check presence of the component and section from an uploaded_file.

They need to satisfy at least the NEW queue constraints that includes SourcePackageRelease creation, so component and section need to exist. Even if they might be overridden in the future.

@property
def component(self):
Return an IComponent for self.component.name.
@property
def section(self):
Return an ISection for self.section_name.
def checkBuild(self, build):
Check the status of the build this file is part of.
Parametersbuildan IPackageBuild instance
def extractUserDefinedFields(self, control):
Extract the user defined fields out of a control file list.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.