Part of lp.archiveuploader.uploadpolicy View In Hierarchy
Known subclasses: lp.archiveuploader.tests.AnythingGoesUploadPolicy, lp.archiveuploader.tests.test_uploadprocessor.BrokenUploadPolicy, lp.archiveuploader.uploadpolicy.BuildDaemonUploadPolicy, lp.archiveuploader.uploadpolicy.InsecureUploadPolicy, lp.archiveuploader.uploadpolicy.SyncUploadPolicy
An upload policy consists of a list of attributes which are used to verify an upload is permissible (e.g. whether or not there must be a valid signature on the .changes file). The policy also contains the tests themselves and they operate on NascentUpload instances in order to verify them.
Method | __init__ | Prepare a policy... |
Method | validateUploadType | Check that the type of the given upload is accepted by this policy. |
Method | setOptions | Store the options for later. |
Method | setDistroSeriesAndPocket | Set the distroseries and pocket from the provided name. |
Method | checkUpload | Mandatory policy checks on NascentUploads. |
Method | policySpecificChecks | Implement any policy-specific checks in child. |
Method | autoApprove | Return whether the upload should be automatically approved. |
Method | autoApproveNew | Return whether the NEW upload should be automatically approved. |
When the type (e.g. sourceful, binaryful or mixed) is not accepted, the upload is rejected.
It also sets self.archive to the distroseries main_archive.
This is called only if the upload is a recognised package; if it is new, autoApproveNew is used instead.