l.s.m.p.PackageCloner : class documentation

Part of lp.soyuz.model.packagecloner View In Hierarchy

Used for copying of various publishing history data across archives.
Method clonePackages Copies packages from origin to destination package location.
Method mergeCopy Please see IPackageCloner.
Method packageSetDiff Please see IPackageCloner.
Method _create_missing_builds Create builds for all cloned source packages.
Method _clone_binary_packages Copy binary publishing data from origin to destination.
Method _compute_packageset_delta Given a source/target archive find obsolete or missing packages.
Method _init_packageset_delta Set up a temp table with data about target archive packages.
Method _clone_source_packages Copy source publishing data from origin to destination.
Method _print_diagnostics Print details of source packages that are fresher or new.
def clonePackages(self, origin, destination, distroarchseries_list=None, processors=None, sourcepackagenames=None):
Copies packages from origin to destination package location.

Binary packages are only copied for the `DistroArchSeries` pairs
specified.

@type origin: PackageLocation
@param origin: the location from which packages are to be copied.
@type destination: PackageLocation
@param destination: the location to which the data is to be copied.
@type distroarchseries_list: list of pairs of (origin, destination)
    distroarchseries instances.
@param distroarchseries_list: the binary packages will be copied
    for the distroarchseries pairs specified (if any).
@param processors: the processors to create builds for.
@type processors: Iterable
@param sourcepackagenames: the sourcepackages to copy to the
    destination
@type sourcepackagenames: Iterable
def _create_missing_builds(self, distroseries, archive, distroarchseries_list, processors):
Create builds for all cloned source packages.
Parametersdistroseriesthe distro series for which to create builds.
archivethe archive for which to create builds.
processorsthe list of processors for which to create builds.
def _clone_binary_packages(self, origin, destination, origin_das, destination_das, sourcepackagenames=None):
Copy binary publishing data from origin to destination.

@type origin: PackageLocation
@param origin: the location from which binary publishing
    records are to be copied.
@type destination: PackageLocation
@param destination: the location to which the data is
    to be copied.
@type origin_das: DistroArchSeries
@param origin_das: the DistroArchSeries from which to copy
    binary packages
@type destination_das: DistroArchSeries
@param destination_das: the DistroArchSeries to which to copy
    binary packages
@param sourcepackagenames: List of source packages to restrict
    the copy to
@type sourcepackagenames: Iterable
def mergeCopy(self, origin, destination):
Please see IPackageCloner.
def _compute_packageset_delta(self, origin):
Given a source/target archive find obsolete or missing packages.

This means finding out which packages in a given source archive are fresher or new with respect to a target archive.

def _init_packageset_delta(self, destination):
Set up a temp table with data about target archive packages.

This is a first step in finding out which packages in a given source archive are fresher or new with respect to a target archive.

Merge copying of packages is one of the use cases that requires such a package set diff capability.

In order to find fresher or new packages we first set up a temporary table that lists what packages exist in the target archive (additionally considering the distroseries, pocket and component).

def _clone_source_packages(self, origin, destination, sourcepackagenames):
Copy source publishing data from origin to destination.

@type origin: PackageLocation
@param origin: the location from which source publishing
    records are to be copied.
@type destination: PackageLocation
@param destination: the location to which the data is
    to be copied.
@type sourcepackagenames: Iterable
@param sourcepackagenames: List of source packages to restrict
    the copy to
def packageSetDiff(self, origin, destination, logger=None):
Please see IPackageCloner.
def _print_diagnostics(self, logger, store):
Print details of source packages that are fresher or new.

Details of packages that are fresher or new in the origin archive are logged using the supplied 'logger' instance. This data is only available after a package set delta has been computed (see packageSetDiff()).

API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.