Function | update_files_privacy | Update file privacy according to the publishing destination |
Function | has_restricted_files | Whether or not a given source files has restricted files. |
Class | CheckedCopy | Representation of a copy that was checked and approved. |
Function | check_copy_permissions | Check that person has permission to copy a package. |
Class | CopyChecker | Check copy candiates. |
Function | do_copy | Perform the complete copy of the given sources incrementally. |
Function | _do_direct_copy | Copy publishing records to another location. |
Parameters | pub_record | One of a SourcePackagePublishingHistory or BinaryPackagePublishingHistory record. |
Returns | a list of changed LibraryFileAlias objects. |
Check that `person` has permission to copy a package. :param person: User attempting the upload. :param archive: Destination `Archive`. :param series: Destination `DistroSeries`. :param pocket: Destination `Pocket`. :param sources: Sequence of `SourcePackagePublishingHistory`s for the packages to be copied. :raises CannotCopy: If the copy is not allowed.
Perform the complete copy of the given sources incrementally.
Verifies if each copy can be performed using CopyChecker
and
raises CannotCopy
if one or more copies could not be performed.
When CannotCopy
is raised, call sites are responsible for rolling
back the transaction. Otherwise, performed copies will be commited.
Wrapper for do_direct_copy
.
Parameters | sources | a list of ISourcePackagePublishingHistory . |
archive | the target IArchive . | |
series | the target IDistroSeries , if None is given the same
current source distroseries will be used as destination. | |
the target PackagePublishingPocket . | ||
include_binaries | optional boolean, controls whether or not the published binaries for each given source should be also copied along with the source. | |
person | the requester IPerson . | |
check_permissions | boolean indicating whether or not the requester's permissions to copy should be checked. | |
overrides | A list of IOverride as returned from one of the copy
policies which will be used as a manual override insyead of using the
default override returned by IArchive.getOverridePolicy(). There
must be the same number of overrides as there are sources and each
override must be for the corresponding source in the sources list. | |
send_email | Should we notify for the copy performed? NOTE: If running in zopeless mode, the email is sent even if the transaction is later aborted. (See bug 29744) | |
announce_from_person | If send_email is True, then send announcement emails with this person as the From: | |
strict_binaries | If 'include_binaries' is True then setting this to True will make the copy fail if binaries cannot be also copied. | |
close_bugs | A boolean indicating whether or not bugs on the copied publications should be closed. | |
create_dsd_job | A boolean indicating whether or not a dsd job should be created for the new source publication. | |
sponsored | An IPerson representing the person who is
being sponsored for this copy. May be None, but if present will
affect the "From:" address on notifications and the creator of the
publishing record will be set to this person. | |
packageupload | The IPackageUpload that caused this publication
to be created. | |
unembargo | If True, allow copying restricted files from a private archive to a public archive, and unrestrict their library files when doing so. | |
phased_update_percentage | The phased update percentage to apply to the copied publication. | |
logger | An optional logger. | |
Returns | a list of ISourcePackagePublishingHistory and
BinaryPackagePublishingHistory corresponding to the copied
publications. |
Copy each item of the given list of SourcePackagePublishingHistory
to the given destination if they are not yet available (previously
copied).
Also copy published binaries for each source if requested to. Again, only copy binaries that were not yet copied before.
Parameters | source | an ISourcePackagePublishingHistory . |
archive | the target IArchive . | |
series | the target IDistroSeries , if None is given the same
current source distroseries will be used as destination. | |
the target PackagePublishingPocket . | ||
include_binaries | optional boolean, controls whether or not the published binaries for each given source should be also copied along with the source. | |
override | An IOverride as per do_copy(). | |
close_bugs | A boolean indicating whether or not bugs on the copied publication should be closed. | |
create_dsd_job | A boolean indicating whether or not a dsd job should be created for the new source publication. | |
close_bugs_since_version | If close_bugs is True,
then this parameter says which changelog entries to parse looking
for bugs to close. See close_bugs_for_sourcepackagerelease . | |
creator | the requester IPerson . | |
sponsor | the sponsor IPerson , if this copy is being sponsored. | |
packageupload | The IPackageUpload that caused this publication
to be created. | |
phased_update_percentage | The phased update percentage to apply to the copied publication. | |
logger | An optional logger. | |
Returns | a list of ISourcePackagePublishingHistory and
BinaryPackagePublishingHistory corresponding to the copied
publications. |