l.s.i.w.IPackageUpload(Interface) : interface documentation

Part of lp.soyuz.interfaces.webservice View In Hierarchy

A Queue item for the archive uploader.
Attribute changesfile The librarian alias for the changes file associated with this upload
Attribute signing_key Changesfile Signing Key.
Attribute sources The queue sources associated with this queue item
Attribute builds The queue builds associated with the queue item
Attribute customfiles Custom upload files associated with this queue item
Attribute sourcepackagerelease The source package release for this item
TextLine searchable_names Undocumented
List searchable_versions Undocumented
Attribute contains_installer whether or not this upload contains installers images
Attribute contains_translation whether or not this upload contains translations
Attribute contains_upgrader whether or not this upload contains upgrader images
Attribute contains_ddtp whether or not this upload contains DDTP images
Attribute contains_signing whether or not this upload contains signing images
Attribute contains_uefi whether or not this upload contains a signed UEFI boot loader image (deprecated)
Attribute isPPA Return True if this PackageUpload is a PPA upload.
Attribute components The set of components used in this upload.
Method sourceFileUrls URLs for all the source files attached to this upload.
Method binaryFileUrls URLs for all the binary files attached to this upload.
Method customFileUrls URLs for all the custom files attached to this upload.
Method getBinaryProperties The properties of the binaries associated with this queue item.
Method getFileByName Return the corresponding ILibraryFileAlias in this context.
Method setUnapproved Set queue state to UNAPPROVED.
Method setAccepted Set queue state to ACCEPTED.
Method setDone Set queue state to DONE.
Method setRejected Set queue state to REJECTED.
Method acceptFromUploader Perform upload acceptance during upload-time.
Method acceptFromQueue Call setAccepted, do a syncUpdate, and send notification email.
Method rejectFromQueue Call setRejected, do a syncUpdate, and send notification email.
Method realiseUpload Take this ACCEPTED upload and create the publishing records for it
Method addSource Add the provided source package release to this queue entry.
Method addBuild Add the provided build to this queue entry.
Method addCustom Add the provided library file alias as a custom queue entry of
Method syncUpdate Write updates made on this object to the database.
Method notify Notify by email when there is a new distroseriesqueue entry.
Method overrideSource Override the source package contained in this queue item.
Method overrideBinaries Override binary packages in a binary queue item.
changesfile =
The librarian alias for the changes file associated with this upload
signing_key =
Changesfile Signing Key.
sources =
The queue sources associated with this queue item
builds =
The queue builds associated with the queue item
customfiles =
Custom upload files associated with this queue item
sourcepackagerelease =
The source package release for this item
searchable_names =
Undocumented
searchable_versions =
Undocumented
contains_installer =
whether or not this upload contains installers images
contains_translation =
whether or not this upload contains translations
contains_upgrader =
whether or not this upload contains upgrader images
contains_ddtp =
whether or not this upload contains DDTP images
contains_signing =
whether or not this upload contains signing images
contains_uefi =
whether or not this upload contains a signed UEFI boot loader image (deprecated)
isPPA =
Return True if this PackageUpload is a PPA upload.
components =
The set of components used in this upload.

For sources, this is the component on the associated sourcepackagerelease. For binaries, this is all the components on all the binarypackagerelease records arising from the build.

@export_read_operation()
@operation_for_version('devel')
def sourceFileUrls():
URLs for all the source files attached to this upload.
ReturnsA collection of URLs for this upload.
@export_read_operation()
@operation_for_version('devel')
def binaryFileUrls():
URLs for all the binary files attached to this upload.
ReturnsA collection of URLs for this upload.
@export_read_operation()
@operation_for_version('devel')
def customFileUrls():
URLs for all the custom files attached to this upload.
ReturnsA collection of URLs for this upload.
@export_read_operation()
@operation_for_version('devel')
def getBinaryProperties():
The properties of the binaries associated with this queue item.
ReturnsA list of dictionaries, each containing the properties of a single binary.
def getFileByName(filename):
Return the corresponding ILibraryFileAlias in this context.

The following file types (and extension) can be looked up in the PackageUpload context:

  • Changes files: '.changes';
  • Source files: '.orig.tar.gz', 'tar.gz', '.diff.gz' and '.dsc'.
  • Custom files: '.tar.gz'.

:raises NotFoundError if no file could be found.

:return the corresponding ILibraryFileAlias if the file was found.

Parametersfilenamethe exact filename to be looked up.
def setUnapproved():
Set queue state to UNAPPROVED.
def setAccepted():
Set queue state to ACCEPTED.

Perform the required checks on its content, so we guarantee data integrity by code.

def setDone():
Set queue state to DONE.
def setRejected():
Set queue state to REJECTED.
def acceptFromUploader(changesfile_path, logger=None):

Perform upload acceptance during upload-time.

  • Move the upload to accepted queue in all cases.
  • Publish and close bugs for 'single-source' uploads.
  • Skip bug-closing for PPA uploads.
  • Grant karma to people involved with the upload.
@export_write_operation()
@call_with(REQUEST_USER)
@operation_for_version('devel')
def acceptFromQueue(user=None):

Call setAccepted, do a syncUpdate, and send notification email.

  • Grant karma to people involved with the upload.
@export_write_operation()
@operation_parameters(TextLine(_('Rejection comment'), False))
@call_with(REQUEST_USER)
@operation_for_version('devel')
def rejectFromQueue(user, comment=None):
Call setRejected, do a syncUpdate, and send notification email.
def realiseUpload(logger=None):
Take this ACCEPTED upload and create the publishing records for it as appropriate.

When derivation is taken into account, this may result in queue items being created for derived distributions.

If a logger is provided, messages will be written to it as the upload is entered into the publishing records.

Return a list containing the publishing records created.

def addSource(spr):
Add the provided source package release to this queue entry.
def addBuild(build):
Add the provided build to this queue entry.
def addCustom(library_file, custom_type):
Add the provided library file alias as a custom queue entry of the given custom type.
def syncUpdate():
Write updates made on this object to the database.

This should be used when you can't wait until the transaction is committed to have some updates actually written to the database.

def notify(status=None, summary_text=None, changes_file_object=None, logger=None):
Notify by email when there is a new distroseriesqueue entry.

This will send new, accept, announce and rejection messages as appropriate.

ParametersstatusThe current PackageUploadStatus when this notification was generated. Defaults to self.status.
summary_textAny additional text to append to the auto- generated summary. This is also the only text used if there is a rejection message generated.
changes_file_objectAn open file object pointing at the changes file. Current, only nascentupload need supply this as the transaction is not committed to the DB at that point so data needs to be obtained from the changes file.
loggerSpecify a logger object if required. Mainly for tests.
@operation_parameters(TextLine(u'The new component name.'), TextLine(u'The new section name.'))
@call_with(None, REQUEST_USER)
@export_write_operation()
@operation_for_version('devel')
def overrideSource(new_component=None, new_section=None, allowed_components=None, user=None):
Override the source package contained in this queue item.

The override values may be None, in which case they are not changed.

Parametersnew_componentAn IComponent to replace the existing one in the upload's source.
new_sectionAn ISection to replace the existing one in the upload's source.
allowed_componentsA sequence of components that the callsite is allowed to override from and to.
userThe user requesting the override change, used if allowed_components is None.
ReturnsTrue if the source was overridden.
RaisesQueueInconsistentStateErrorif either the existing or the new_component are not in the allowed_components sequence.
@operation_parameters(List(u'A sequence of changes to apply.', u"Each item may have a 'name' item which specifies the binary package name to override; otherwise, the change applies to all binaries in the upload. It may also have 'component', 'section', and 'priority' items which replace the corresponding existing one in the upload's overridden binaries.", Dict(TextLine())))
@call_with(None, REQUEST_USER)
@export_write_operation()
@operation_for_version('devel')
def overrideBinaries(changes, allowed_components=None, user=None):
Override binary packages in a binary queue item.
ParameterschangesA sequence of mappings of changes to apply. Each change mapping may have a "name" item which specifies the binary package name to override; otherwise, the change applies to all binaries in the upload. It may also have "component", "section", and "priority" items which replace the corresponding existing one in the upload's overridden binaries. Any missing items are left unchanged.
allowed_componentsA sequence of components that the callsite is allowed to override from and to.
userThe user requesting the override change, used if allowed_components is None.
ReturnsTrue if any binaries were overridden.
RaisesQueueInconsistentStateErrorif either the existing or the new_component are not in the allowed_components sequence.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.