Part of lp.soyuz.interfaces.archive View In Hierarchy
Known subclasses: lp.soyuz.interfaces.webservice.IArchive
TextLine | title | Undocumented |
Int | purpose | Undocumented |
Int | sources_cached | Number of source packages cached in this PPA. |
Int | binaries_cached | Number of binary packages cached in this PPA. |
Attribute | package_description_cache | Concatenation of the source and binary packages published in this archive. Its content is used for indexed searches across archives. |
Attribute | number_of_sources | The number of sources published in the context archive. |
Attribute | number_of_binaries | The number of binaries published in the context archive. |
Attribute | sources_size | The size of sources published in the context archive. |
Attribute | binaries_size | The size of binaries published in the context archive. |
Attribute | estimated_size | Estimated archive size. |
Int | total_count | The total number of builds in this archive. This counter does not include discontinued (superseded, cancelled, obsoleted) builds |
Int | pending_count | The number of pending builds in this archive. |
Int | succeeded_count | The number of successful builds in this archive. |
Int | building_count | The number of active builds in this archive. |
Int | failed_count | The number of failed builds in this archive. |
Datetime | date_created | The time when the archive was created. |
Attribute | dirty_suites | Suites that the next publisher run should publish regardless of pending publications. |
Attribute | available_processors | The architectures that are available to be enabled or disabled for this archive. |
Method | setProcessors | Set the architectures on which the archive can build. |
Method | getSourcesForDeletion | All ISourcePackagePublishingHistory available for deletion. |
Method | getPublishedOnDiskBinaries | Unique IBinaryPackagePublishingHistory target to this archive. |
Method | allowUpdatesToReleasePocket | Return whether the archive allows publishing to the release pocket. |
Method | getComponentsForSeries | Calculate the components available for use in this archive. |
Method | updateArchiveCache | Concentrate cached information about the archive contents. |
Method | findDepCandidates | Return matching binaries in this archive and its dependencies. |
Method | getPermissions | Get the IArchivePermission record with the supplied details. |
Method | canUploadSuiteSourcePackage | Check if 'person' upload 'suitesourcepackage' to 'archive'. |
Method | canModifySuite | Decides whether or not to allow uploads for a given DS/pocket. |
Method | checkUploadToPocket | Check if an upload to a particular archive and pocket is possible. |
Method | checkUpload | Check if 'person' upload 'suitesourcepackage' to 'archive'. |
Method | verifyUpload | Can 'person' upload 'sourcepackagename' to this archive ? |
Method | canAdministerQueue | Check to see if person is allowed to administer queue items. |
Method | getFileByName | Return the corresponding ILibraryFileAlias in this context. |
Method | getSourceFileByName | Return the ILibraryFileAlias for a source name/version/filename. |
Method | getBinaryPackageRelease | Find the specified IBinaryPackageRelease in the archive. |
Method | getBinaryPackageReleaseByFileName | Return the corresponding IBinaryPackageRelease in this context. |
Method | requestPackageCopy | Return a new PackageCopyRequest for this archive. |
Method | getUploadersForPackageset | The ArchivePermission records for uploaders to the package set. |
Method | getPackagesetsForUploader | The ArchivePermission records for the person's package sets. |
Method | getComponentsForUploader | Return the components that 'person' can upload to this archive. |
Method | getPocketsForUploader | Return the pockets that 'person' can upload to this archive. |
Method | getPackagesetsForSourceUploader | The package set based permissions for a given source and uploader. |
Method | getPackagesetsForSource | All package set based permissions for the given source. |
Method | isSourceUploadAllowed | True if the person is allowed to upload the given source package. |
Method | updatePackageDownloadCount | Update the daily download count for a given package. |
Method | getPackageDownloadTotal | Get the total download count for a given package. |
Method | getPockets | Return iterable containing valid pocket names for this archive. |
Method | getOverridePolicy | Returns an instantiated IOverridePolicy for the archive. |
TextLine | buildd_secret | The password used by the build farm to access the archive. |
Method | getAllPublishedBinaries | All IBinaryPackagePublishingHistory target to this archive. |
Method | getBuildCounters | Return a dictionary containing the build counters for an archive. |
Method | getBuildSummariesForSourceIds | Return a dictionary containing a summary of the build statuses. |
Method | getArchiveDependency | Return the IArchiveDependency object for the given dependency. |
Method | getAllPermissions | Return all IArchivePermission records for this archive. |
Method | getPermissionsForPerson | Return the IArchivePermission records applicable to the person. |
Method | getUploadersForPackage | Return IArchivePermission records for the package's uploaders. |
Method | getUploadersForComponent | Return IArchivePermission records for the component's uploaders. |
Method | getQueueAdminsForComponent | Return IArchivePermission records for authorized queue admins. |
Method | getComponentsForQueueAdmin | Return IArchivePermission for the person's queue admin |
Method | getUploadersForPocket | Return IArchivePermission records for the pocket's uploaders. |
Method | getQueueAdminsForPocket | Return IArchivePermission records for authorized queue admins. |
Method | getPocketsForQueueAdmin | Return IArchivePermission for the person's queue admin pockets. |
Method | hasAnyPermission | Whether or not this person has any permission at all on this |
Method | getPackageDownloadCount | Get the IBinaryPackageDownloadCount with the given key. |
Method | getFilesAndSha1s | Return a dictionary with the filenames and the SHA1s for each |
Method | copyPackage | Copy a single named source into this archive. |
Method | copyPackages | Copy multiple named sources into this archive from another. |
Method | _checkUpload | Wrapper around checkUpload for the web service API. |
Inherited from IHasBuildRecords:
Method | getBuildRecords | Return build records in the context it is implemented. |
ISourcePackagePublishingHistory
available for deletion.Parameters | name: optional source name filter (SQL LIKE) | |
status: PackagePublishingStatus filter, can be a sequence. | ||
distroseries: IDistroSeries filter. | ||
Returns | SelectResults containing ISourcePackagePublishingHistory . |
IBinaryPackagePublishingHistory
target to this archive.
In spite of getAllPublishedBinaries method, this method only returns distinct binary publications inside this Archive, i.e, it excludes architecture-independent publication for other architetures than the nominatedarchindep. In few words it represents the binary files published in the archive disk pool.
Parameters | name: binary name filter (exact match or SQL LIKE controlled by 'exact_match' argument). | |
version: binary version filter (always exact match). | ||
status: PackagePublishingStatus filter, can be a list. | ||
distroarchseries: IDistroArchSeries filter, can be a list. | ||
pocket: PackagePublishingPocket filter. | ||
exact_match: either or not filter source names by exact matching. | ||
Returns | SelectResults containing IBinaryPackagePublishingHistory . |
If a distroseries is stable, normally release pocket publishings are not allowed. However some archive types allow this.
Returns | True or False |
Returns | An IResultSet of IComponent objects. |
Group the relevant package information (source name, binary names, binary summaries and distroseries with binaries) strings in the IArchive.package_description_cache search indexes (fti).
Updates 'sources_cached' and 'binaries_cached' counters.
Also include owner 'name' and 'displayname' to avoid inpecting the Person table indexes while searching.
Return all published IBinaryPackagePublishingHistory
records with
the given name, in this archive and dependencies as specified by the
given build context, using the usual archive dependency rules.
We can't just use the first, since there may be other versions published in other dependency archives.
Parameters | distro_arch_series | the context IDistroArchSeries . |
the context PackagePublishingPocket . | ||
component | the context IComponent . | |
source_package_name | the context source package name (as text). | |
dep_name | the name of the binary package to look up. | |
Returns | a sequence of matching IBinaryPackagePublishingHistory
records. |
IArchivePermission
record with the supplied details.Parameters | person | An IPerson |
item | An IComponent , ISourcePackageName | |
perm_type | An ArchivePermissionType enum, | |
Returns | A list of IArchivePermission records. |
Parameters | person | An IPerson who might be uploading. |
suitesourcepackage | An ISuiteSourcePackage to be uploaded. | |
Returns | True if they can, False if they cannot. |
Some archive types (e.g. PPAs) allow uploads to the RELEASE pocket regardless of the distroseries state. For others (principally primary archives), only allow uploads for RELEASE pocket in unreleased distroseries, and conversely only allow uploads for non-RELEASE pockets in released distroseries. For instance, in edgy time :
warty -> DENY edgy -> ALLOW warty-updates -> ALLOW edgy-security -> DENY
Note that FROZEN is not considered either 'stable' or 'unstable' state. Uploads to a FROZEN distroseries will end up in the UNAPPROVED queue.
Return True if the upload is allowed and False if denied.
Parameters | distroseries | A IDistroSeries |
A PackagePublishingPocket | ||
person | Check for redirected pockets if this person is not a queue admin. | |
Returns | Reason why uploading is not possible or None |
Parameters | person | An IPerson who might be uploading. |
distroseries | The IDistroSeries being uploaded to. | |
sourcepackagename | The ISourcePackageName being uploaded. | |
component | The Component being uploaded to. | |
The PackagePublishingPocket of 'distroseries' being
uploaded to. | ||
strict_component | True if access to the specific component for the package is needed to upload to it. If False, then access to any component will do. | |
Returns | The reason for not being able to upload, None otherwise. |
Parameters | person | The IPerson trying to upload to the package. Referred
to as 'the signer' in upload code. |
sourcepackagename | The source package being uploaded. None if the package is new. | |
archive | The IArchive being uploaded to. | |
component | The IComponent that the source package belongs to. | |
distroseries | The upload's target distro series. | |
strict_component | True if access to the specific component for the package is needed to upload to it. If False, then access to any component will do. | |
The PackagePublishingPocket being uploaded to. If
None, then pocket permissions are not checked. | ||
Returns | CannotUploadToArchive if 'person' cannot upload to the archive, None otherwise. |
Check to see if person is allowed to administer queue items. :param person: An `IPerson` who should be checked for authentication. :param components: The context `IComponent`(s) for the check. :param pocket: The context `PackagePublishingPocket` for the check. :param distroseries: The context `IDistroSeries` for the check. :return: True if 'person' is allowed to administer the package upload queue for all given 'components', or for the given 'pocket' (optionally restricted to a single 'distroseries'). If 'components' is empty or None and 'pocket' is None, check if 'person' has any queue admin permissions for this archive.
Return the corresponding `ILibraryFileAlias` in this context. The following file types (and extension) can be looked up in the archive context: * Source files: '.orig.tar.gz', 'tar.gz', '.diff.gz' and '.dsc'; * Binary files: '.deb' and '.udeb'; * Source changesfile: '_source.changes'; * Package diffs: '.diff.gz'; :param filename: exactly filename to be looked up. :raises AssertionError if the given filename contains a unsupported filename and/or extension, see the list above. :raises NotFoundError if no file could not be found. :return the corresponding `ILibraryFileAlias` is the file was found.
ILibraryFileAlias
for a source name/version/filename.
This can be used to avoid ambiguities with getFileByName
in
imported archives, where the upstream archive software may not
always have had robust historical filename uniqueness checks.
Parameters | name | The name of the source package. |
version | The version of the source package. | |
filename | The exact filename to look up. | |
Returns | the corresponding ILibraryFileAlias . | |
Raises | NotFoundError | if no matching file could be found. |
Find the specified IBinaryPackageRelease
in the archive.
Parameters | name | The IBinaryPackageName of the package. |
version | The version of the package. | |
archtag | The architecture tag of the package's build. 'all' will not work here -- 'i386' (the build DAS) must be used instead. |
IBinaryPackageRelease
in this context.Parameters | filename | The filename to look up. |
Returns | The IBinaryPackageRelease with the specified filename,
or None if it was not found. |
PackageCopyRequest
for this archive.
:return The new IPackageCopyRequest
Parameters | target_location | the archive location to which the packages are to be copied. |
requestor | The IPerson who is requesting the package copy
operation. | |
suite | The IDistroSeries name with optional pocket, for
example, 'hoary-security'. If this is not provided it will
default to the current series' release pocket. | |
copy_binaries | Whether or not binary packages should be copied as well. | |
reason | The reason for this package copy request. | |
Raises | NotFoundError | if the provided suite is not found for this archive's distribution. |
ArchivePermission
records for uploaders to the package set.Parameters | packageset | An IPackageset . |
direct_permissions | If True, only consider permissions granted directly for the package set at hand. Otherwise, include any uploaders for package sets that include this one. | |
Returns | ArchivePermission records for all the uploaders who are
authorized to upload to the named source package set. |
ArchivePermission
records for the person's package sets.Parameters | person | An IPerson for whom you want to find out which
package sets they have access to. |
Returns | ArchivePermission records for all the package sets that
'person' is allowed to upload to. |
Return the components that 'person' can upload to this archive. :param person: An `IPerson` wishing to upload to an archive. :return: A `set` of `IComponent`s that 'person' can upload to.
Parameters | person | An IPerson wishing to upload to an archive. |
Returns | A set of PackagePublishingPocket items that 'person'
can upload to. |
The package set based permissions for a given source and uploader.
IArchivePermission
records thatapply to this archive
person
Parameters | sourcepackagename | the source package name; can be
either a string or a ISourcePackageName . |
person | An IPerson for whom you want to find out which
package sets they have access to. | |
Returns | ArchivePermission records for the package sets that
include the given source package name and to which the given
person may upload. | |
Raises | NoSuchSourcePackageName | if a source package with the given name could not be found. |
This method is meant to aid the process of "debugging" package set based archive permission since It allows the listing of permissions for the given source package in this archive (irrespective of the principal).
Parameters | sourcepackagename | the source package name; can be
either a string or a ISourcePackageName . |
direct_permissions | If set only package sets that directly include the given source will be considered. | |
Returns | ArchivePermission records for the package sets that
include the given source package name and apply to the
archive in question. | |
Raises | NoSuchSourcePackageName | if a source package with the given name could not be found. |
If the source package name is included by any package set with an explicit permission then only such explicit permissions will be considered.
Parameters | sourcepackagename | the source package name; can be
either a string or a ISourcePackageName . |
person | An IPerson for whom you want to find out which
package sets they have access to. | |
distroseries | The IDistroSeries for which to check
permissions. If none is supplied then currentseries in
the archive's distribution is assumed. | |
Returns | True if the person is allowed to upload the source package. | |
Raises | NoSuchSourcePackageName | if a source package with the given name could not be found. |
If there's no matching IBinaryPackageReleaseDownloadCount
entry,
we create one with the given count. Otherwise we just increase the
count of the existing one by the given amount.
Parameters | bpr | The IBinaryPackageRelease to update the count for. |
day | The date to update the count for. | |
country | The ICountry to update the count for. | |
count | The new download count. |
IOverridePolicy
for the archive.IBinaryPackagePublishingHistory
target to this archive.Parameters | name | binary name filter (exact match or SQL LIKE controlled by 'exact_match' argument). |
version | binary version filter (always exact match). | |
status | PackagePublishingStatus filter, can be a list. | |
distroarchseries | IDistroArchSeries filter, can be a list. | |
PackagePublishingPocket filter. | ||
exact_match | either or not filter source names by exact matching. | |
created_since_date | Only return publications created on or after this date. | |
ordered | Normally publications are ordered by binary package name and then ID order (creation order). If this parameter is False then the results will be unordered. This will make the operation much quicker to return results if you don't care about ordering. | |
order_by_date | Order publications by descending creation date and then by descending ID. This is suitable for applications that need to catch up with publications since their last run. | |
Returns | A collection containing BinaryPackagePublishingHistory . |
Return a dictionary containing the build counters for an archive.
This is necessary currently because the IArchive.failed_builds etc. counters are not in use.
The returned dictionary contains the follwoing keys and values:
- 'total': total number of builds (includes SUPERSEDED);
- 'pending': number of builds in BUILDING or NEEDSBUILD state;
- 'failed': number of builds in FAILEDTOBUILD, MANUALDEPWAIT, CHROOTWAIT and FAILEDTOUPLOAD state;
- 'succeeded': number of SUCCESSFULLYBUILT builds.
- 'superseded': number of SUPERSEDED builds.
Parameters | include_needsbuild | Indicates whether to include builds with the status NEEDSBUILD in the pending and total counts. This is useful in situations where a build that hasn't started isn't considered a build by the user. (type: bool) |
Returns | a dictionary with the 4 keys specified above. (type: dict.) |
Only information for sources belonging to the current archive will
be returned. See
IPublishingSet
.getBuildStatusSummariesForSourceIdsAndArchive() for
details.
Parameters | source_ids | A list of source publishing history record ids. (type: list) |
Returns | A dict consisting of the overall status summaries for the given ids that belong in the archive. |
IArchiveDependency
object for the given dependency.Parameters | dependency | is an IArchive object. |
Returns | IArchiveDependency or None if a corresponding object
could not be found. |
IArchivePermission
records for this archive.Returns | A list of IArchivePermission records. |
IArchivePermission
records applicable to the person.Parameters | person | An IPerson |
Returns | A list of IArchivePermission records. |
IArchivePermission
records for the package's uploaders.Parameters | source_package_name | An ISourcePackageName or textual name
for the source package. |
Returns | A list of IArchivePermission records. |
IArchivePermission
records for the component's uploaders.Parameters | component_name | An IComponent or textual name for the
component. |
Returns | A list of IArchivePermission records. |
IArchivePermission
records for authorized queue admins.Parameters | component_name | An IComponent or textual name for the
component. |
Returns | A list of IArchivePermission records. |
IArchivePermission
for the person's queue admin
components.Parameters | person | An IPerson . |
Returns | A list of IArchivePermission records. |
IArchivePermission
records for the pocket's uploaders.Parameters | A PackagePublishingPocket . | |
Returns | A list of IArchivePermission records. |
IArchivePermission
records for authorized queue admins.Parameters | A PackagePublishingPocket . | |
distroseries | An optional IDistroSeries . | |
Returns | A list of IArchivePermission records. |
IArchivePermission
for the person's queue admin pockets.Parameters | person | An IPerson . |
Returns | A list of IArchivePermission records. |
Parameters | person | The IPerson for whom the check is performed. |
Returns | A boolean indicating if the person has any permission on this archive at all. |
IBinaryPackageDownloadCount
with the given key.Parameters | source_files | A list of filenames to return SHA1s of |
Returns | A dictionary of filenames and SHA1s. |
Asynchronously copy a specific version of a named source to the destination archive if necessary. Calls to this method will return immediately if the copy passes basic security checks and the copy will happen sometime later with full checking.
If the source or target distribution has a development series alias, then it may be used as the source or target distroseries name respectively; but note that this will always be resolved to the true development series of that distribution, which may not match the alias in the respective published archives.
Parameters | source_name | a string name of the package to copy. |
version | the version of the package to copy. | |
from_archive | the source archive from which to copy. | |
to_pocket | the target pocket (as a string). | |
to_series | the target distroseries (as a string). | |
include_binaries | optional boolean, controls whether or not the published binaries for each given source should also be copied along with the source. | |
person | the IPerson who requests the sync. | |
sponsored | the IPerson who is being sponsored. Specifying
this will ensure that the person's email address is used as the
"From:" on the announcement email and will also be recorded as
the creator of the new source publication. | |
unembargo | if True, allow copying restricted files from a private archive to a public archive, and re-upload them to the public librarian when doing so. | |
auto_approve | if True and the IPerson requesting the sync
has queue admin permissions on the target, accept the copy
immediately rather than setting it to unapproved. | |
silent | Suppress any emails that the copy would generate. Only usable with queue admin permissions on the target. | |
from_pocket | the source pocket (as a string). If omitted, copy from any pocket with a matching version. | |
from_series | the source distroseries (as a string). If omitted, copy from any series with a matching version. | |
phased_update_percentage | the phased update percentage to apply to the copied publication. | |
Raises | NoSuchSourcePackageName | if the source name is invalid |
PocketNotFound | if the pocket name is invalid | |
NoSuchDistroSeries | if the distro series name is invalid | |
CannotCopy | if there is a problem copying. |
Asynchronously copy the most recent PUBLISHED versions of the named sources to the destination archive if necessary. Calls to this method will return immediately if the copy passes basic security checks and the copy will happen sometime later with full checking.
Partial changes of the destination archive can happen because each source is copied in its own transaction.
If the source or target distribution has a development series alias, then it may be used as the source or target distroseries name respectively; but note that this will always be resolved to the true development series of that distribution, which may not match the alias in the respective published archives.
Parameters | source_names | a list of string names of packages to copy. |
from_archive | the source archive from which to copy. | |
to_pocket | the target pocket (as a string). | |
to_series | the target distroseries (as a string). | |
from_series | the source distroseries (as a string). | |
include_binaries | optional boolean, controls whether or not the published binaries for each given source should also be copied along with the source. | |
person | the IPerson who requests the sync. | |
sponsored | the IPerson who is being sponsored. Specifying
this will ensure that the person's email address is used as the
"From:" on the announcement email and will also be recorded as
the creator of the new source publication. | |
unembargo | if True, allow copying restricted files from a private archive to a public archive, and re-upload them to the public librarian when doing so. | |
auto_approve | if True and the IPerson requesting the sync
has queue admin permissions on the target, accept the copies
immediately rather than setting it to unapproved. | |
silent | Suppress any emails that the copy would generate. Only usable with queue admin permissions on the target. | |
Raises | NoSuchSourcePackageName | if the source name is invalid |
PocketNotFound | if the pocket name is invalid | |
NoSuchDistroSeries | if the distro series name is invalid | |
CannotCopy | if there is a problem copying. |