benchbuild.utils.container module

Container utilites.

class benchbuild.utils.container.Container[source]

Bases: object

filename
local

Finds the current location of a container. Also unpacks the project if necessary.

Returns:The path, where the container lies in the end.
Return type:target
name = 'container'
remote
class benchbuild.utils.container.Gentoo[source]

Bases: benchbuild.utils.container.Container

name = 'gentoo'
remote

Get a remote URL of the requested container.

src_file(**kwargs)[source]
benchbuild.utils.container.cached(func)[source]

Memoize a function result.

benchbuild.utils.container.in_container()[source]

Check, whether we are running inside a container.

benchbuild.utils.container.is_valid(container, path)[source]

Checks if a container exists and is unpacked.

Parameters:path – The location where the container is expected.
Returns:True if the container is valid, False if the container needs to unpacked or if the path does not exist yet.
benchbuild.utils.container.unpack(container, path)[source]

Unpack a container usable by uchroot.

Method that checks if a directory for the container exists, checks if erlent support is needed and then unpacks the container accordingly.

Parameters:path – The location where the container is, that needs to be unpacked.