Introduction
Tools of the development environment can be on top of this API.
Plugins like builders should be at the bottom of this API.
The current implementation mainly use plugins for Git and Buildroot.
Project
-
exception modules.project.ComponentNotFoundForDomain(domain)[source]
-
exception modules.project.NoPluginForService(service)[source]
-
class modules.project.Project(path, bare=False, repo_path=None)[source]
Main class to describe/manage the project
-
add_component()[source]
-
add_profile(profile)[source]
add a profile from the current version
-
add_split(version)[source]
-
add_tool()[source]
-
build()[source]
-
build_bootloader()[source]
-
build_kernel()[source]
-
build_rootfs()[source]
-
build_toolchain()[source]
-
component_exists(name)[source]
Service: return True if package already in Plugin
-
config_commit(comment, amend=False)[source]
commit config
-
config_has_changes()[source]
check local changes not committed
-
config_is_published()[source]
check commits not pushed to the repository
-
config_is_updated()[source]
check remote changes not merged
-
config_is_writeable()[source]
no commit can be done if not on a branch
-
config_publish()[source]
push config commits to the repository
-
configure()[source]
-
create_component(name, local_paths, target_directory, pkg_description=None, help='No help')[source]
Service: Add directory to the target rootfs
-
elements_are_published()[source]
check commits not pushed to the repositories
-
elements_are_updated()[source]
check remote changes not merged
-
elements_have_changes()[source]
check local changes not committed
-
elements_match_config()[source]
check if versions of all elements match the global configuration
-
get_available_measures()[source]
Return list of available measures
-
get_build_command()[source]
-
get_config_ref(version=None, profile=None)[source]
return tag or branch of the nearest version/profile for the specified version/profile
-
get_desc()[source]
-
get_deselected_components()[source]
-
get_deselected_tools()[source]
-
get_install_bootloader_command()[source]
-
get_install_kernel_command()[source]
-
get_install_rootfs_command()[source]
message of HEAD
-
get_latest_release()[source]
first part of current or previous tag name (before ‘#’) of the current branch
-
get_measure(measure_type, ref=None)[source]
Return a tuple (ref, measure) or None
-
get_measures(measure_type, ref=None)[source]
Return a list of tuple [(ref, measure), ...] or None
-
get_name()[source]
-
get_path()[source]
-
get_profile()[source]
second part of current branch name (after ‘#’)
-
get_profiles(version_split=None, release=None)[source]
second part of branches names (after ‘#’) of the current version
-
get_releases(version_split=None)[source]
first part of tags names (before ‘#’)
-
get_run_command()[source]
-
get_selected_components()[source]
return list of Component() objects
-
get_selected_tools()[source]
-
get_version()[source]
current release or split
-
get_version_split()[source]
first part of current branch name (before ‘#’)
-
get_version_splits()[source]
first part of branches names (before ‘#’)
-
get_versions()[source]
lists of releases in a dict of splits
-
install_all()[source]
-
install_bootloader()[source]
-
install_kernel()[source]
-
install_rootfs()[source]
-
is_released()[source]
check if last commit is tagged
-
jump(ref)[source]
try to checkout config at ref and jump elements if possible
-
run()[source]
-
set_desc(desc)[source]
-
set_install_bootloader_command(command)[source]
-
set_install_kernel_command(command)[source]
-
set_install_rootfs_command(command)[source]
-
set_measure_path(path=None)[source]
Instanciate Measure object with ‘path’
-
set_name(name)[source]
-
set_release(release)[source]
create a new tag for the current version/profile
-
set_run_command(command)[source]
-
view_serial_line(device='/dev/ttyUSB0', dry_run=False)[source]
-
exception modules.project.ProjectError[source]
-
modules.project.create_project(path, config_to_clone=None, bare=False, repo_path=None)[source]
-
modules.project.get_template_location(template_name)[source]
-
modules.project.get_templates()[source]
-
modules.project.open_project(path, bare=False, repo_path=None)[source]
-
class plugins.config.Config(path, top_dir=None)[source]
Basic methods about config directory
-
get_global_dict()[source]
-
get_global_value(key)[source]
-
get_path()[source]
-
get_plugins_for(service)[source]
return plugins objects which are configured and implement service()
-
get_ref(version, profile)[source]
return branch or tag
-
get_top_dir()[source]
-
set_global_value(key, value)[source]
-
exception plugins.config.ConfigError[source]
-
plugins.config.get_profile_from(branch)[source]
second part of branch name (after ‘#’)
-
plugins.config.get_version_from(branch)[source]
first part of branch name (before ‘#’)
Element
Component and Tool are inherited of Element.
-
class modules.component.Component(name, config=None, default_path=None, bare=False)[source]
components are elements which are built for the target
-
get_builder()[source]
-
get_domain()[source]
-
get_path()[source]
-
modules.component.get_all_components(config)[source]
-
class modules.tool.Tool(name, config=None, default_path=None, bare=False)[source]
tools are elements which are used on the host
-
get_builder()[source]
-
get_path()[source]
-
class modules.element.Element(name, category, global_conf, default_path=None, bare=False)[source]
Base class for tools and components
-
bookmark()[source]
-
checkout()[source]
checkout configured version
-
clone(default_from=None)[source]
clone from configured repository or default_from
-
configure()[source]
Open interactive configurator
-
create_repository()[source]
-
deselect()[source]
-
get_configured_ref()[source]
return dict {commit, name, type, head} of branch or tag referenced in location_uri
match remote HEAD if location_uri doesn’t contain any ref
-
get_configured_version(auto=True)[source]
-
get_current_version()[source]
-
get_location_name()[source]
return name of location or None if not
-
get_name()[source]
-
get_repository()[source]
-
has_repository()[source]
-
is_bookmarked()[source]
-
is_configurable()[source]
Return True if element is Configurable itself.
For example, buildroot, linux, busybox are self configurable via menuconfig
-
is_selected()[source]
return True, False or None if unspecified
-
remove()[source]
-
select()[source]
-
set_repository(uri, access_type=None)[source]
-
set_version(version)[source]
-
unbookmark()[source]
-
unselect()[source]
-
class modules.element.ElementConf(save, *args, **kw)[source]
-
has(key)[source]
-
is_set(key, default=False)[source]
-
remove(key)[source]
-
set(key, value='yes')[source]
-
exception modules.element.ElementError[source]
base class for element Error
Infos
-
exception modules.licence.BadElementType(err)[source]
-
exception modules.licence.ElementNotFound(err)[source]
-
exception modules.licence.LicenceError(err)[source]
Base class for exceptions in this module
-
class modules.licence.LicenceManager(db='/home/tmonjalo/projets/rtel4i/rtel4i-open/src/middleware/doc/source/../../modules/licences.db')[source]
Base class for managing licences associations with components
and tools (elements)
-
add_element(element, type, licence)[source]
add element in licence db
-
add_licence(slug, name, url)[source]
add licence in db
-
create_db()[source]
setup a empty DB
-
get_elements(licence)[source]
get all elements for licence
-
get_licence(element)[source]
get licence name for element
-
get_licence_detail(licence)[source]
get detailled info on licence
-
get_licences()[source]
get all licences
-
get_licences_of_elements()[source]
get all licences used
-
insert_db(query, values)[source]
wrapper for insert queries
-
exception modules.licence.LicenceNotFound(err)[source]
-
class modules.measure.Measure(repo_path)[source]
Class to get measures informations
-
get_available_measures(refresh=False)[source]
Return a list of available measures
-
get_measure(measure_type, ref)[source]
-
get_path()[source]
Repos
-
class plugins.location.Location(full_uri, access_type=None)[source]
Usefull class to clone various type of project repository
-
clone(dest)[source]
-
get_type()[source]
-
classmethod get_types()[source]
-
get_uri()[source]
-
get_version()[source]
-
http_get(dest)[source]
-
exception plugins.location.LocationError[source]
-
class plugins.location.TarFile(filename=None)[source]
redefine TarFile to be with-compliant
-
plugins.location.get_uri_type(uri)[source]
-
class plugins.gitrepo.GitCommit(repo, sha, tree=None, author=None, authored_date=None, author_tz_offset=None, committer=None, committed_date=None, committer_tz_offset=None, message=None, parents=None)[source]
-
get_age()[source]
return relative time since the commit date.
note: If you want the absolute time, use self.committed_date instead
-
get_branch()[source]
Check if commit correspond to a head of branch
return Branch or None
-
get_parent_branch()[source]
Return branch if commit is on head or a parent branch
-
get_tag()[source]
Check if commit correspond to a tag.
return Tag or None
-
exception plugins.gitrepo.GitNoBranchError[source]
Thrown when head is in strange state (Not in any branch ?).
(Can be happened when rebasing for example)
-
class plugins.gitrepo.GitRepo[source]
Git tools on top of GitPython
-
checkout(ref)[source]
-
commit(comment, amend=False)[source]
-
get_branch_refs(ref)[source]
return ordered tags and branch head for branch which contains ref
-
get_branches()[source]
-
get_commit_message(ref=None, short=False)[source]
Return the last commit message or None if ref doesn’t exist.
If short is enable, just return the summary message
-
get_current_branch()[source]
-
get_current_commit()[source]
return SHA for HEAD
-
get_current_ref()[source]
return dict {commit, name, type} for HEAD
-
get_head_tags(branch=None)[source]
-
get_latest_tag(branch=None)[source]
-
get_latest_tags(branch=None)[source]
-
get_ref_branch(ref)[source]
return branch which contains ref
-
get_tags(branches=None)[source]
-
get_tracked_branch()[source]
-
has_changes()[source]
-
is_published()[source]
-
is_tagged(branch=None)[source]
-
is_updated()[source]
-
is_writeable()[source]
-
publish()[source]
-
refresh()[source]
-
set_tag(tag)[source]
-
start_branch(branch)[source]
-
exception plugins.gitrepo.GitRepoError[source]
Base Class for GitRepo Exception
Builder
-
class plugins.buildroot.Buildroot(config)[source]
Buildroot plugin
-
build()[source]
-
build_bootloader()[source]
-
build_kernel()[source]
Handy function, but not used in main build process
-
build_rootfs()[source]
-
build_toolchain()[source]
-
check_install()[source]
Check if buildroot is installed
Check if Makefile is present
-
component_exists(pkg_name)[source]
Return True if package is in Buildroot
-
classmethod configure(config)[source]
-
configure_component(name)[source]
Exec the interactive configure script for a component
-
create_component(name, local_paths, target_directory, pkg_description=None, help='No help')[source]
make buildroot custom package
Use makefile.basic.in (currently in buildroot-ow).
Generate .mk file and Config entries.
name, local_paths and target_directory are mandatory.
local_paths = list of files and paths to add to target_directory
package_description, force and help are not mandatory.
-
get_element_path(name)[source]
Return the element build directory from buildroot,
or None if it could not find it
-
get_selected_components()[source]
-
get_self_configurable_cmd(name)[source]
Get cmd for configurable components.
Ex: (‘linux’) -> returns ‘linux26-menuconfig’
-
make_link_for_external_component(comp_name, comp_path)[source]
Make symlink for component which must be built by buildroot but are in different path
comp_name : component Name
comp_path : Real component Path
-
exception plugins.buildroot.BuildrootError[source]
Base class for Buildroot Plugin Exception
-
exception plugins.buildroot.BuildrootNotImplementedError(feature)[source]
-
exception plugins.buildroot.ComponentNotSupported[source]
get_component_path fail...
-
exception plugins.buildroot.ConfigFileError[source]
Something wrong with Buildroot Config file
-
exception plugins.buildroot.InstallError[source]
Buildroot cannot install
-
class plugins.common.kconfig.Kconfig(conf_file, prefix)[source]
Handle get/set on configuration file of kconfig system
-
get_parameter(param)[source]
-
get_selected_parameters()[source]
-
is_selected(param)[source]
Check if param is set in Config File
-
set_parameter(param, val)[source]
-
class plugins.common.plugin.Plugin[source]
Generic API for all plugins
-
classmethod configure(config)[source]
-
static get_api_version()[source]
-
classmethod get_doc()[source]
-
classmethod get_name()[source]
-
classmethod get_services()[source]
-
class plugins.common.service.Service(name='', command_get='')[source]
-
get_command()[source]
-
get_name()[source]