l.s.a.archivedependencies : module documentation

Part of lp.soyuz.adapters

Archive dependencies helper function.

This module contains the static maps representing the 'layered' component and pocket dependencies and helper function to handler ArchiveDependency records.

Auxiliary functions exposed for testing purposes:

sources_list content generation.

Function get_components_for_context Return the components allowed to be used in the build context.
Function get_primary_current_component Return the component of the primary archive ancestry.
Function expand_dependencies Return the set of dependency archives, pockets and components.
Function get_sources_list_for_building Return sources.list entries and keys required to build the given item.
Function _has_published_binaries Whether or not the archive dependency has published binaries.
Function _get_binary_sources_list_line Return the correponding binary sources_list line.
Function _get_sources_list_for_dependencies Return sources.list entries and keys.
Function _get_default_primary_dependencies Return the default primary dependencies for a given context.
def get_components_for_context(component, distroseries, pocket):
Return the components allowed to be used in the build context.
Parameterscomponentthe context IComponent.
distroseriesthe context IDistroSeries.
pocketthe context IPocket.
Returnsa list of component names.
def get_primary_current_component(archive, distroseries, sourcepackagename):
Return the component of the primary archive ancestry.

If no ancestry could be found, default to 'universe'.

def expand_dependencies(archive, distro_arch_series, pocket, component, source_package_name, tools_source=None, tools_fingerprint=None, logger=None):
Return the set of dependency archives, pockets and components.
Parametersarchivethe context IArchive.
distro_arch_seriesthe context IDistroArchSeries.
pocketthe context PackagePublishingPocket.
componentthe context IComponent.
source_package_nameA source package name (as text)
tools_sourceif not None, a sources.list entry to use as an additional dependency for build tools, just before the default primary archive.
tools_fingerprintif not None, the OpenPGP signing key fingerprint for the archive given in tools_source.
loggeran optional logger.
Returnsa list of (archive, distro_arch_series, pocket, [component]), representing the dependencies defined by the given build context.
@defer.inlineCallbacks
def get_sources_list_for_building(build, distroarchseries, sourcepackagename, tools_source=None, tools_fingerprint=None, logger=None):
Return sources.list entries and keys required to build the given item.

The sources.list entries are returned in the order that is most useful:
  1. the context archive itself
  2. external dependencies
  3. user-selected archive dependencies
  4. the default primary archive

The keys are in an arbitrary order.

Parametersbuilda context IBuild.
distroarchseriesA IDistroArchSeries
sourcepackagenameA source package name (as text)
tools_sourceif not None, a sources.list entry to use as an additional dependency for build tools, just before the default primary archive.
tools_fingerprintif not None, the OpenPGP signing key fingerprint for the archive given in tools_source.
loggeran optional logger.
Returnsa Deferred resolving to a tuple containing a list of deb sources.list entries (lines) and a list of base64-encoded public keys.
def _has_published_binaries(archive, distroarchseries, pocket):
Whether or not the archive dependency has published binaries.
def _get_binary_sources_list_line(archive, distroarchseries, pocket, components):
Return the correponding binary sources_list line.
@defer.inlineCallbacks
def _get_sources_list_for_dependencies(dependencies, logger=None):
Return sources.list entries and keys.

Process the given list of dependency tuples for the given
`DistroArchseries`.

:param dependencies: list of 3 elements tuples as:
    (`IArchive`, `IDistroArchSeries`, `PackagePublishingPocket`,
     list of `IComponent` names)
:param distroarchseries: target `IDistroArchSeries`;

:return: a tuple containing a list of sources.list formatted lines and a
    list of base64-encoded public keys.
def _get_default_primary_dependencies(archive, distro_arch_series, component, pocket):
Return the default primary dependencies for a given context.
Parametersarchivethe context IArchive.
distro_arch_seriesthe context IDistroArchSeries.
componentthe context IComponent.
pocketthe context PackagePublishingPocket.
Returnsa list containing the default dependencies to primary archive.
API Documentation for Launchpad, generated by pydoctor at 2018-10-17 00:00:11.