Part of lp.soyuz.interfaces.publishing View In Hierarchy
Method | publishBinaries | Efficiently publish multiple BinaryPackageReleases in an Archive. |
Method | copyBinaries | Copy multiple binaries to a given destination. |
Method | newSourcePublication | Create a new SourcePackagePublishingHistory . |
Method | getByIdAndArchive | Return the publication matching id AND archive. |
Method | getBuildsForSourceIds | Return all builds related with each given source publication. |
Method | getBuildsForSources | Return all builds related with each given source publication. |
Method | getUnpublishedBuildsForSources | Return all the unpublished builds for each source. |
Method | getBinaryFilesForSources | Return binary files related to each given source publication. |
Method | getFilesForSources | Return all files related to each given source publication. |
Method | getBinaryPublicationsForSources | Return all binary publication for the given source publications. |
Method | getBuiltPackagesSummaryForSourcePublication | Return a summary of the built packages for this source publication. |
Method | getActiveArchSpecificPublications | Find architecture-specific binary publications for a source. |
Method | getChangesFilesForSources | Return all changesfiles for each given source publication. |
Method | getChangesFileLFA | The changes file for the given SourcePackageRelease . |
Method | setMultipleDeleted | Mark publications as deleted. |
Method | findCorrespondingDDEBPublications | Find corresponding DDEB publications, given a list of publications. |
Method | requestDeletion | Delete the source and binary publications specified. |
Method | getBuildStatusSummariesForSourceIdsAndArchive | Return a summary of the build statuses for source publishing ids. |
Method | getBuildStatusSummaryForSourcePublication | Return a summary of the build statuses for this source |
Creates IBinaryPackagePublishingHistory
records for each
binary, handling architecture-independent, avoiding creation of
duplicate publications, and leaving disabled architectures
alone.
Parameters | archive | The target IArchive . |
distroseries | The target IDistroSeries . | |
The target PackagePublishingPocket . | ||
binaries | A dict mapping BinaryPackageReleases to their
desired overrides as (Component , Section ,
PackagePublishingPriority , phased_update_percentage ) tuples. | |
Returns | A list of new IBinaryPackagePublishingHistory records. |
Copy multiple binaries to a given destination. Efficiently copies the given `IBinaryPackagePublishingHistory` records to a new archive and suite, optionally overriding the original publications' component, section and priority using an `IOverridePolicy`. :param archive: The target `IArchive`. :param distroseries: The target `IDistroSeries`. :param pocket: The target `PackagePublishingPocket`. :param binaries: A list of `IBinaryPackagePublishingHistory`s to copy. :param policy: An optional `IOverridePolicy` to apply to the copy. :return: A result set of the created `IBinaryPackagePublishingHistory` records.
SourcePackagePublishingHistory
.
datecreated will be UTC_NOW. status will be PackagePublishingStatus.PENDING
Parameters | archive | An IArchive |
sourcepackagerelease | An ISourcePackageRelease | |
distroseries | An IDistroSeries | |
component | An IComponent | |
section | An ISection | |
A PackagePublishingPocket | ||
ancestor | A ISourcePackagePublishingHistory for the previous
version of this publishing record | |
create_dsd_job | A boolean indicating whether or not a dsd job should be created for the new source publication. | |
creator | An optional IPerson . If this is None, the
sourcepackagerelease's creator will be used. | |
sponsor | An optional IPerson indicating the sponsor of this
publication. | |
packageupload | An optional IPackageUpload that caused this
publication to be created. |
Parameters | archive | The context IArchive . |
source | If true look for source publications, otherwise binary publications. |
Return all builds related with each given source publication.
The returned ResultSet contains entries with the wanted Build`s
associated with the corresponding source publication and its
targeted `DistroArchSeries
in a 3-element tuple. This way the extra
information will be cached and the callsites can group builds in
any convenient form.
The optional archive parameter, if provided, will ensure that only builds corresponding to the archive will be included in the results.
The result is ordered by:
- Ascending
SourcePackagePublishingHistory.id
,- Ascending
DistroArchSeries.architecturetag
.
Parameters | source_ids | list of or a single
SourcePackagePublishingHistory object. (type: list or SourcePackagePublishingHistory ) |
archive | An optional archive with which to filter the source
ids. (type: IArchive ) | |
build_states | optional list of build states to which the result will be limited. Defaults to all states if ommitted. (type: list or None) | |
need_build_farm_job | whether to include the PackageBuild
and BuildFarmJob in the result. | |
Returns | a storm ResultSet containing tuples as
(SourcePackagePublishingHistory , Build , DistroArchSeries ) (type: storm.store.ResultSet .) |
Extracts the source ids from one_or_more_source_publications and calls getBuildsForSourceIds.
Parameters | one_or_more_source_publications | list of, or a single
SourcePackagePublishingHistory object. |
build_states | list of build states to which the result should be limited. Defaults to BuildStatus.FULLYBUILT if none are specified. | |
Returns | a storm ResultSet containing tuples of
(SourcePackagePublishingHistory , Build ) |
Return binary files related to each given source publication. The returned ResultSet contains entries with the wanted `LibraryFileAlias`s (binaries only) associated with the corresponding source publication and its `LibraryFileContent` in a 3-element tuple. This way the extra information will be cached and the callsites can group files in any convenient form. :param one_or_more_source_publication: list of or a single `SourcePackagePublishingHistory` object. :return: a storm ResultSet containing triples as follows: (`SourcePackagePublishingHistory`, `LibraryFileAlias`, `LibraryFileContent`)
Return all files related to each given source publication. The returned ResultSet contains entries with the wanted `LibraryFileAlias`s (source and binaries) associated with the corresponding source publication and its `LibraryFileContent` in a 3-element tuple. This way the extra information will be cached and the callsites can group files in any convenient form. Callsites should order this result after grouping by source, because SQL UNION can't be correctly ordered in SQL level. :param one_or_more_source_publication: list of or a single `SourcePackagePublishingHistory` object. :return: an *unordered* storm ResultSet containing tuples as (`SourcePackagePublishingHistory`, `LibraryFileAlias`, `LibraryFileContent`)
Return all binary publication for the given source publications. The returned ResultSet contains entries with the wanted `BinaryPackagePublishingHistory`s associated with the corresponding source publication and its targeted `DistroArchSeries`, `BinaryPackageRelease` and `BinaryPackageName` in a 5-element tuple. This way the extra information will be cached and the callsites can group binary publications in any convenient form. The result is ordered by: 1. Ascending `SourcePackagePublishingHistory.id`, 2. Ascending `BinaryPackageName.name`, 3. Ascending `DistroArchSeries.architecturetag`. 4. Descending `BinaryPackagePublishingHistory.id`. :param one_or_more_source_publication: list of or a single `SourcePackagePublishingHistory` object. :return: a storm ResultSet containing tuples as (`SourcePackagePublishingHistory`, `BinaryPackagePublishingHistory`, `BinaryPackageRelease`, `BinaryPackageName`, `DistroArchSeries`)
For each built package from this published source, return a dictionary with keys "binarypackagename" and "summary", where the binarypackagename is unique (i.e. it ignores the same package published in more than one place/architecture.)
In that case, this search will return foo(i386) and foo(amd64). The dominator uses this when figuring out whether foo-common can be superseded: we don't track dependency graphs, but we know that the architecture-specific "foo" releases are likely to depend on the architecture-independent foo-common release.
Parameters | sourcepackagerelease | The SourcePackageRelease . |
archive | The Archive to search. | |
distroseries | The DistroSeries to search. | |
The PackagePublishingPocket to search. | ||
Returns | A Storm result set of active, architecture-specific
BinaryPackagePublishingHistory objects for the source package
release in the given archive , distroseries , and pocket . |
Return all changesfiles for each given source publication. The returned ResultSet contains entries with the wanted changesfiles as `LibraryFileAlias`es associated with the corresponding source publication and its corresponding `LibraryFileContent`, `PackageUpload` and `SourcePackageRelease` in a 5-element tuple. This way the extra information will be cached and the call sites can group changesfiles in any convenient form. The result is ordered by ascending `SourcePackagePublishingHistory.id` :param one_or_more_source_publication: list of or a single `SourcePackagePublishingHistory` object. :return: a storm ResultSet containing tuples as (`SourcePackagePublishingHistory`, `PackageUpload`, `SourcePackageRelease`, `LibraryFileAlias`, `LibraryFileContent`)
SourcePackageRelease
.Parameters | spr | the SourcePackageRelease for which to return the
changes file LibraryFileAlias . |
Returns | a LibraryFileAlias instance or None |
This is a supporting operation for a deletion request.
This method deletes the source publications passed via the first parameter as well as their associated binary publications, and any binary publications passed in.
Parameters | pubs | list of SourcePackagePublishingHistory and
BinaryPackagePublishingHistory objects. |
removed_by | IPerson responsible for the removal. | |
removal_comment | optional text describing the removal reason. | |
Returns | The deleted publishing record, either:
ISourcePackagePublishingHistory or
IBinaryPackagePublishingHistory . |
Return a summary of the build statuses for source publishing ids. This method collects all the builds for the provided source package publishing history ids, and returns the build status summary for the builds associated with each source package. See the `getStatusSummaryForBuilds()` method of `IBuildSet`.for details of the summary. :param source_ids: A list of source publishing history record ids. :type source_ids: ``list`` :param archive: The archive which will be used to filter the source ids. :type archive: `IArchive` :return: A dict consisting of the overall status summaries for the given ids that belong in the archive. For example: { 18: {'status': 'succeeded'}, 25: {'status': 'building', 'builds':[building_builds]}, 35: {'status': 'failed', 'builds': [failed_builds]} } :rtype: ``dict``.
See ISourcePackagePublishingHistory
.getStatusSummaryForBuilds()
for details. The call is just proxied here so that it can also be
used with an ArchiveSourcePublication passed in as
the source_package_pub, allowing the use of the cached results.