Developer Guide¶
Deploy for development¶
This project uses pip to manage the package. If you want to work on the project yourself you can create the necessary links via:
$ sudo pip3 install -e .
That will install a backlink /usr/bin/kas to this project. Now you are able to call it from anywhere.
Docker image build¶
Just run:
$ docker build -t <image_name> .
When you need a proxy to access the internet, add:
--build-arg http_proxy=<http_proxy> --build-arg https_proxy=<https_proxy>
to the call.
Community Resources¶
Project home:
Source code:
- https://github.com/siemens/kas.git
- git@github.com:siemens/kas.git
Documentation:
Mailing list:
Class reference documentation¶
kas.kas
Module¶
This module is the main entry point for kas, setup tool for bitbake based projects
kas.libkas
Module¶
This module contains the core implementation of kas.
-
kas.libkas.
find_program
(paths, name)[source]¶ Find a file within the paths array and returns its path.
-
kas.libkas.
repos_fetch
(config, repos)[source]¶ Fetches the list of repositories to the kas_work_dir.
-
kas.libkas.
run_cmd
(cmd, cwd, env=None, fail=True, shell=False, liveupdate=True)[source]¶ Runs a command synchronously.
-
kas.libkas.
run_cmd_async
(cmd, cwd, env=None, fail=True, shell=False, liveupdate=True)[source]¶ Run a command asynchronously.
kas.libcmds
Module¶
This module contain common commands used by kas plugins.
-
class
kas.libcmds.
CleanupSSHAgent
[source]¶ Remove all the identities and stop the ssh-agent instance.
kas.build
Module¶
The build plugin for kas.
kas.shell
Module¶
This module contains a kas plugin that opens a shell within the kas environment
kas.config
Module¶
This module contains the implementation of the kas configuration.
-
class
kas.config.
Config
(filename, target, task=None)[source]¶ Implements the kas configuration based on config files.
-
build_dir
¶ The path of the build directory.
-
get_repo_dict
()[source]¶ Returns a dictionary containing the repositories with their name (as it is defined in the config file) as key and the Repo instances as value.
-
kas_work_dir
¶ The path to the kas work directory.
-
kas.repos
Module¶
This module contains the Repo class.
kas.includehandler
Module¶
This module implements how includes of configuration files are handled in kas.
-
class
kas.includehandler.
GlobalIncludes
(top_file)[source]¶ Implements a handler where every configuration file should contain a dictionary as the base type with and ‘includes’ key containing a list of includes.
The includes can be specified in two ways, as a string containg the relative path from the current file or as a dictionary. The dictionary should have a ‘file’ key, containing the relative path to the include file and optionally a ‘repo’ key, containing the key of the repository. If the ‘repo’ key is missing the value of the ‘file’ key is threated the same as if just a string was defined, meaning the path is relative to the current config file otherwise its relative to the repository path.
The includes are read and merged depth first from top to buttom.
-
exception
kas.includehandler.
IncludeException
[source]¶ Class for exceptions that appear in the include mechanism.
-
class
kas.includehandler.
IncludeHandler
(top_file)[source]¶ Abstract class that defines the interface of an include handler.