Module mcfg::shared[][src]

Common modules used by the actions defined in the actions module.

  • Models
    • package sets - the things you keep in your repository
    • installers - the things that install package sets
  • Logging
    • install log - the place we record what the installers did
  • Command Execution
    • shell command - the way we execute installers
    • editor - when we need to edit things
    • env - the environment variables we set for executing installers

Modules

builders

Builder implementations to construct package and installer related struct types.

Structs

InstalledPackage

This represents a single log entry in PackageLog.

Installer

This holds the configuration regarding a single installer type, these can be platform-specific or not, and are defined to handle one kind of PackageKind. These instances are a part of the InstallerRegistry and loaded from a single file.

InstallerRegistry

The installer registry is a file that contains a list of Installer configurations. This is also the interface for installer actions such as install, update, uninstall.

Name

This allows only a restricted set of characters to name packages, package sets, and installers. Characters must be either alphanumeric, or one of the following special characters: ‘.’, ‘+’, ‘-’, ‘_’, ‘@’, or ‘/’.

Package

A Package is the unit of installation, provided by a configured Installer. It therefore has a name, platform match, and package kind.

PackageLog

This is the log where installer actions are recorded, primarily the successful installation of packages within a package set.

PackageRepository

The package repository is a directory that contains package groups, which in turn contain package sets.

PackageSet

A Package set brings together a set of package actions, with additional actions such as linking files, adding an env-file, and run before/after script strings.

PackageSetGroup

Package set groups are simply directories in the package repository.

StepCounter

A Step counter will simply return an increasing integer (u32) value, nothing fancy.

Enums

InstallActionKind

An action that may be taken by an installer. These are set and passed through by a client such as the CLI to denote the action to take.

PackageKind

This enumeration captures the set of support package types.

PackageSetActions

The kinds of actions a package set can perform; either a list of packages to install, or a map of actions to script strings.

Platform

This enumeration captures the set of supported platforms.

Traits

FileSystemResource

A Trait that is used by model elements that have file-system backed persistence.

Functions

add_action_vars

Add additional variables based on the installation action.

add_other_vars

Add any additional variables outside the pre-defined set. These, and only these variable mappings support substitution using the values in existing_vars. Substitution will be applied to both keys and values in other_vars.

add_package_action_vars

Add additional variables based on the the selected Package.

add_package_set_action_vars

Add additional variables based on the the selected PackageSet.

default_vars

Return a default set of variables, these can be the basis for any script/command execution environment.

edit_file

Edit the provided file, the editor to run is taken from user_editor.

execute_interactive_shell

Execute a shell interactively, the shell to run is taken from user_shell.

execute_shell_command

Execute a script string using a shell, the shell to run is taken from user_shell.

user_editor

Return the currently selected editor for this terminal session.

user_shell

Return the currently selected shell for this terminal session.