Part of lp.soyuz.scripts.packagecopier View In Hierarchy
Allows the checker function to identify conflicting copy candidates within the copying batch.
Method | __init__ | Initialize a copy checker. |
Method | addCopy | Store a copy in the inventory as a CheckedCopy instance. |
Method | getCheckedCopies | Return a list of copies allowed to be performed. |
Method | getConflicts | Conflicting CheckedCopy objects in the inventory. |
Method | checkCopy | Check if the source can be copied to the given location. |
Method | _getInventoryKey | Return a key representing the copy candidate in the inventory. |
Method | _checkArchiveConflicts | Check for possible conflicts in the destination archive. |
Method | _checkConflictingFiles | Undocumented |
Parameters | archive | the target IArchive . |
include_binaries | controls whether or not the published binaries for each given source should be also copied along with the source. | |
strict_binaries | If 'include_binaries' is True then setting this to True will make the copy fail if binaries cannot be also copied. | |
unembargo | If True, allow copying from a private archive to a public archive. |
Parameters | candidate | a ISourcePackagePublishingHistory copy candidate. |
Returns | a tuple with the source (name, version) strings. |
CheckedCopy
objects in the inventory.Parameters | candidate | a ISourcePackagePublishingHistory copy candidate. |
Returns | a list of conflicting copies in the inventory, in case of non-conflicting candidates an empty list is returned. |
Check if there is a source with the same name and version published in the destination archive or in the inventory of copies already approved. If it exists (regardless of the series and pocket) and it has built or will build binaries, do not allow the copy without binaries.
This is because the copied source will rebuild binaries that conflict with existing ones.
Even when the binaries are included, they are checked for conflict.
Parameters | source | copy candidate, ISourcePackagePublishingHistory . |
series | destination IDistroSeries . | |
Raises | CannotCopy | when a copy is not allowed to be performed containing the reason of the error. |
Check if the source can be copied to the given location.
Check possible conflicting publications in the destination archive.
See _checkArchiveConflicts()
.
Also checks if the version of the source being copied is equal or higher than any version of the same source present in the destination suite (series + pocket).
If person is not None, check that this person has upload rights to the destination (archive, component, pocket).
Parameters | source | copy candidate, ISourcePackagePublishingHistory . |
series | destination IDistroSeries . | |
destination PackagePublishingPocket . | ||
person | requester IPerson . | |
check_permissions | boolean indicating whether or not the requester's permissions to copy should be checked. |