l.a.c.ChangesFile(SignableTagFile) : class documentation

Part of lp.archiveuploader.changesfile View In Hierarchy

Changesfile model.
Method __init__ Undocumented
Method parseChanges Process the given changesfile.
Method checkFileName Make sure the changes file name is well-formed.
Method processAddresses Parse addresses and build person objects.
Method isCustom Check if given 'component_and_section' matches a custom upload.
Method processFiles Build objects for each file mentioned in this changesfile.
Method verify Run all the verification checks on the changes data.
Method filename Return the changesfile name.
Method dirname Return the current upload path name.
Method binary_package_files Get a list of BaseBinaryUploadFile initialized in this context.
Method source_package_files Return a list of SourceUploadFile initialized in this context.
Method custom_files Return a list of CustomUploadFile initialized in this context.
Method suite_name Returns the targeted suite name.
Method architectures Return set of strings specifying architectures listed in file.
Method binaries Return set of binary package names listed.
Method converted_urgency Return the appropriate SourcePackageUrgency item.
Method version Return changesfile claimed version.
Class Method formatChangesComment A class utility method for formatting changes for display.
Method changes_comment Return changesfile 'change' comment.
Method date Return changesfile date.
Method source Return changesfile claimed source name.
Method architecture_line Return changesfile archicteture line.
Method simulated_changelog Build and return a changelog entry for this changesfile.
Method _getFilesByType Look up for specific type of processed uploaded files.

Inherited from SignableTagFile:

Method signer Undocumented
Method parse Parse the tag file, optionally verifying the signature.
Method parseAddress Parse an address, using the policy to decide if we should add a
Method _verifySignature Verify the signature on the file content.
def __init__(self, filepath, policy, logger):
Undocumented
def parseChanges(self):
Process the given changesfile.

Does:
  • Verification of required fields
  • Verification of the required Format
  • Parses maintainer and changed-by
  • Checks name of changes file
  • Checks signature of changes file

If any of these checks fail, UploadError is yielded, and it should be considered a fatal error (no subsequent processing of the upload should be done).

Logger and Policy are instances built in uploadprocessor.py passed via NascentUpload class.

def checkFileName(self):
Make sure the changes file name is well-formed.

Please note: for well-formed changes file names the filename_archtag property will be set appropriately.

def processAddresses(self):
Parse addresses and build person objects.

Process 'maintainer' and 'changed_by' addresses separately and return an iterator over all exceptions generated while processing them.

def isCustom(self, component_and_section):
Check if given 'component_and_section' matches a custom upload.

We recognize an upload as custom if it is targeted at a section like 'raw-<something>'. Further checks will be performed in CustomUploadFile class.

def processFiles(self):
Build objects for each file mentioned in this changesfile.

This method is an error generator, i.e, it returns an iterator over all exceptions that are generated while processing all mentioned files.

def verify(self):
Run all the verification checks on the changes data.

This method is an error generator, i.e, it returns an iterator over all exceptions that are generated while verifying the changesfile consistency.

@property
def filename(self):
Return the changesfile name.
@property
def dirname(self):
Return the current upload path name.
def _getFilesByType(self, upload_filetype):
Look up for specific type of processed uploaded files.

It ensure the files mentioned in the changes are already processed.

@property
def binary_package_files(self):
Get a list of BaseBinaryUploadFile initialized in this context.
@property
def source_package_files(self):
Return a list of SourceUploadFile initialized in this context.
@property
def custom_files(self):
Return a list of CustomUploadFile initialized in this context.
@property
def suite_name(self):
Returns the targeted suite name.

For example, 'hoary' or 'hoary-security'.

@property
def architectures(self):
Return set of strings specifying architectures listed in file.

For instance ['source', 'all'] or ['source', 'i386', 'amd64'] or ['source'].

@property
def binaries(self):
Return set of binary package names listed.
@property
def converted_urgency(self):
Return the appropriate SourcePackageUrgency item.
@property
def version(self):
Return changesfile claimed version.
@classmethod
def formatChangesComment(cls, comment):
A class utility method for formatting changes for display.
@property
def changes_comment(self):
Return changesfile 'change' comment.
@property
def date(self):
Return changesfile date.
@property
def source(self):
Return changesfile claimed source name.
@property
def architecture_line(self):
Return changesfile archicteture line.
@property
def simulated_changelog(self):
Build and return a changelog entry for this changesfile.

it includes the change comments followed by the author identification.
{{{
<CHANGES_COMMENT>
 -- <CHANGED-BY>  <DATE>
}}}
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.