Composes

A compose is a collection of repositories, generally created as the output of product content generation. Because Debian repositories exist as a nested hierarchy on a filesystem, and because composes exist as directories containing repository directories, a compose may be thought of as an element in the same hierarchy, at the top. Creating a Compose instance, in the same way as each of the levels of object in a repository, will cause the entire hierarchy to be recursively read from the filesystem.

exception debrepo.composes.InvalidCompose[source]
class debrepo.composes.Compose(path, strict=False, filters=[])[source]

A collection of repositories

Given a path to a compose directory, and an optional set of filters, load a compose and all its subcomponents from the filesystem. If strict is True, any unexpected content will cause the loading of the hierarchy to halt and fail with an exception.

Filters of type TransformFilter with what set to Compose are processed after the entire hierarchy is loaded (so, after all other filters have been processed). The transform() method is given the instance of Compose as its only argument.

Filters of type ExcludeFilter with what set to Repo are applied while scanning repository directories. If a directory matches the exclusion, it is not scanned, and a Repo object for the directory is not created. The omission of the repository does not cause a failure in strict mode.

get_repo(repo_name)[source]

Select repository object by name