Repositories¶
Debian repositories contain a nested hierarchy. Repositories have
distributions, which have components, which have architectures, which have
packages
. The classes below represent this hierarchy. In
general, creating an instance at one level of the hierarchy automatically
causes instances to be created for all the lower levels by reading from the
filesystem.
-
class
debrepo.repos.
Repo
(path, strict=False, filters=[])[source]¶ A subdivision of a
compose
containingdistributions
Given a path to a repository directory, and an optional set of filters, load a repository 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 toRepo
are processed after the entire hierarchy, from the repository down, is loaded (so, after all other filters have been processed). Thetransform()
method is given the instance ofRepo
as its only argument.Filters of type
ExcludeFilter
with what set toDist
are applied while scanning distribution directories. If a directory matches the exclusion, it is not scanned, and aDist
object for the directory is not created. The omission of the distribution does not cause a failure in strict mode.
-
class
debrepo.repos.
Dist
(path, strict=False, filters=[])[source]¶ A subdivision of a
repository
containingcomponents
Given a path to a distribution directory, and an optional set of filters, load a distribution 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 toDist
are processed after the entire hierarchy, from the distribution down, is loaded (so, after all other filters have been processed). Thetransform()
method is given the instance ofDist
as its only argument.Filters of type
ExcludeFilter
with what set toComponent
are applied while scanning component directories. If a directory matches the exclusion, it is not scanned, and aComponent
object for the directory is not created. The omission of the component does not cause a failure in strict mode.
-
class
debrepo.repos.
Component
(path, arches, strict=False, filters=[])[source]¶ A subdivision of a
distribution
containingarchitectures
Given a path to a component directory, a list of valid arches, and an optional set of filters, load a component 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 toComponent
are processed after the entire hierarchy, from the component down, is loaded (so, after all other filters have been processed). Thedebrepo.filters.TransformFilter.transform()
method is given the instance ofComponent
as its only argument.Filters of type
ExcludeFilter
with what set toArch
are applied while scanning architecture directories. If a directory matches the exclusion, it is not scanned, and anArch
object for the directory is not created. The omission of the architecture does not cause a failure in strict mode.
-
class
debrepo.repos.
Arch
(path, strict=False, filters=[])[source]¶ A subdivision of
component
containingpackages
.Given a path to an architecture directory, and an optional set of filters, load an architecture 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 toArch
are processed after the entire hierarchy, from the architecture down, is loaded (so, after all other filters have been processed). Thetransform()
method is given the instance ofArch
as its only argument.Filters of type
ExcludeFilter
with what set toPackage
are applied while reading thePackages
file. If an entry matches the exclusion, it is not scanned, and aPackage
instance for the entry is not created.