mock_chroot.config Package reference¶
mock_chroot.config
Package¶
mock_chroot.config - Library of ways to generate Mock configuration
-
mock_chroot.config.
compose
([config_objects...])¶ Compose configuration objects together to form mock(1) chroot configuration.
Parameters: config_objects (list) – Configuration objects can be strings, objects that have the __str__() method, or anything that is returned from one of the mock_chroot.config functions. Returns: An object representing the unified configuration. The object is an instance of a list subclass, so methods could be called on it to further add configuration objects. Calling __str__() on that object will return the composed configuration string. The object could be passed as an argument to sobsequent calls to compose().
-
mock_chroot.config.
bind_mount
([pairs...])¶ Generate mock(1) bind mount configuration.
Parameters: pairs (list) – List of two-element tuples where the fisrt element is a path on the host and the secont element is the path within the chroot where that path will be bind mounted Returns: A configuration object representing the bind mount configuration
-
mock_chroot.config.
from_koji
(tag=None, target=None, arch='x86_64', koji_profile='brew')[source]¶ Create a koji-based mock(1) configuration
Parameters: - tag (str) – The Koji tag to pull configuration from
- target (str) – The Koji build target tag to pull configuration from
- arch (str) – The Koji build architecture
- koji_profile (str) – The koji configuration profile to use
One and only one of ‘tag’ or ‘target’ must be specified
Returns: A configuration object containing the requested configuration
-
mock_chroot.config.
file
(path, content)[source]¶ Add a file with given content to the mock environemnt
Parameters: - path (str) – The path to the file inside the Mock environment
- content (str) – The content of the file
Returns: Mock configuration object