The diskimage_builder.element_dependencies Module

exception diskimage_builder.element_dependencies.AlreadyProvidedException

Bases: exceptions.Exception

class diskimage_builder.element_dependencies.Element(name, path)

Bases: object

An element

exception diskimage_builder.element_dependencies.InvalidElementDir

Bases: exceptions.Exception

exception diskimage_builder.element_dependencies.MissingElementException

Bases: exceptions.Exception

exception diskimage_builder.element_dependencies.MissingOSException

Bases: exceptions.Exception

diskimage_builder.element_dependencies.expand_dependencies(user_elements, element_dirs)

Deprecated method for expanding element dependencies.

Warning

DO NOT USE THIS FUNCTION. For compatability reasons, this function does not provide paths to the returned elements. This means the caller must process override rules if two elements with the same name appear in element_dirs

Parameters:
  • user_elements – iterable enumerating the elements a user requested
  • elements_dir – The ELEMENTS_PATH to process
Returns:

a set contatining user_elements and all dependent elements including any transitive dependencies.

diskimage_builder.element_dependencies.get_elements(elements, paths=None)

Return the canonical list of elements with their dependencies

Note

You probably do not want to use this! Elements that require access to the list of all other elements should generally use the environment variables exported by disk-image-create below.

Parameters:
  • elements – user specified elements
  • paths – Alternative ELEMENTS_PATH; default is to use from env
Returns:

A de-duplicated list of tuples [(element, path), (element, path) …] with all elements and their dependents, including any transitive dependencies.

diskimage_builder.element_dependencies.main()