Archive dependencies helper function.
This module contains the static maps representing the 'layered' component
and pocket dependencies and helper function to handler ArchiveDependency
records.
- pocket_dependencies: static map of pocket dependencies
Auxiliary functions exposed for testing purposes:
- get_components_for_context: return the corresponding component
dependencies for a component and pocket, this result is known as 'ogre_components';
- get_primary_current_component: return the component where the
building source is published in the primary archive.
sources_list content generation.
- get_sources_list_for_building: return a list of
sources_listlinesthat should be used to build the given
IBuild.
| 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. |
| Parameters | component | the context IComponent. |
| distroseries | the context IDistroSeries. | |
the context IPocket. | ||
| Returns | a list of component names. | |
If no ancestry could be found, default to 'universe'.
| Parameters | archive | the context IArchive. |
| distro_arch_series | the context IDistroArchSeries. | |
the context PackagePublishingPocket. | ||
| component | the context IComponent. | |
| source_package_name | A source package name (as text) | |
| tools_source | if not None, a sources.list entry to use as an additional dependency for build tools, just before the default primary archive. | |
| tools_fingerprint | if not None, the OpenPGP signing key
fingerprint for the archive given in tools_source. | |
| logger | an optional logger. | |
| Returns | a list of (archive, distro_arch_series, pocket, [component]), representing the dependencies defined by the given build context. | |
The keys are in an arbitrary order.
| Parameters | build | a context IBuild. |
| distroarchseries | A IDistroArchSeries | |
| sourcepackagename | A source package name (as text) | |
| tools_source | if not None, a sources.list entry to use as an additional dependency for build tools, just before the default primary archive. | |
| tools_fingerprint | if not None, the OpenPGP signing key
fingerprint for the archive given in tools_source. | |
| logger | an optional logger. | |
| Returns | a Deferred resolving to a tuple containing a list of deb sources.list entries (lines) and a list of base64-encoded public keys. | |
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.
| Parameters | archive | the context IArchive. |
| distro_arch_series | the context IDistroArchSeries. | |
| component | the context IComponent. | |
the context PackagePublishingPocket. | ||
| Returns | a list containing the default dependencies to primary archive. | |