This submodule provides the Distro class, which provides an API for processing rosdistro files.
Table of Contents
The top level representation is a Distro instance, which contains Variant and DistroStack instances. DistroStack instances have a VcsConfig (SvnConfig, GitConfig, BzrConfig, HgConfig), which represents the source control information for the stack.:
Distro
- Variant
- DistroStack
- VcsConfig
Get distro URI of main ROS distribution files.
Parameters: | distro_name – name of distro, e.g. ‘diamondback’ |
---|---|
Returns: | the SVN/HTTP URL of the specified distro. This function should only be used with the main distros. |
Load Distro instance from source_uri.
Example:
from rospkg.distro import load_distro, distro_uri
d = load_distro(distro_uri('electric'))
Parameters: | source_uri – source URI of distro file, or path to distro file. Filename has precedence in resolution. |
---|---|
Raises: | InvalidDistro if distro file is invalid |
Raises: | rospkg.ResourceNotFound if file at source_uri is not found |
Replace variables in VCS config rule value with specified values
Parameters: |
|
---|---|
Raises: | KeyError if branch is invalid or if distro is mis-configured |
Stores information about a stack release
Parameters: |
|
---|
Name of stack.
Version number of stack.
Name of distribution release. Necessary for rule expansion.
A variant defines a specific set of stacks (“metapackage”, in Debian parlance). For example, “base”, “pr2”. These variants can extend another variant.
Parameters: |
|
---|
Get list of all stack names in this variant.
Parameters: | implicit – If True, includes names of stacks in parent variants. Otherwise, include only stacks explicitly named in this variant. (default True). |
---|
List of all stack names in this variant, including implicit stacks.
Store information in a rosdistro file.
Parameters: |
|
---|
Parameters: | released – only included released stacks |
---|---|
Returns: | dictionary of stack names to DistroStack instances in this distro. |
Dictionary of stack names mapped to DistroStack instances in this distro.
Dictionary of released stack names mapped to DistroStack instances in this distro.
Base representation of a rosdistro VCS rules configuration.
Configuration information for a distributed VCS-style repository.
Configuration fields:
- repo_uri: base URI of repo
- dev_branch: git branch the code is developed
- distro_tag: a tag of the latest released code for a specific ROS distribution
- release_tag: a tag of the code for a specific release
Configuration information about an GIT repository. See parent class DvcsConfig for more API information.
Configuration information about a Mercurial repository. See parent class DvcsConfig for more API information.
Configuration information about an BZR repository. See parent class DvcsConfig for more API information.
Configuration information about an SVN repository.
Configuration fields:
- dev: where the code is developed
- distro_tag: a tag of the code for a specific ROS distribution
- release_tag: a tag of the code for a specific release
Returns: | Dictionary of supported VcsConfig instances. Key is the VCS type name, e.g. ‘svn’. |
---|
Factory for creating VcsConfig subclass based on rosdistro _rules data.
Parameters: |
|
---|---|
Returns: | VcsConfig subclass instance with interpreted rules data. |