Packages¶
Packages are represented by the metadata read from Debian RFC822 paragraphs in
a repository’s distribution’s component’s architecture’s Packages
file.
The Package
class avoids loading the actual package archives from the
filesystem until absolutely necessary (i.e., reading the change log).
-
class
debrepo.packages.
Package
(deb822data, repo=None, filters=[])[source]¶ A single Debian package described by a repository’s
Packages
fileGiven a Debian RFC822 paragraph parsed into a dictionary, and an optional set of filters, create a representation of a Debian package archive suitable for inspecting repository contents.
Filters of type
TransformFilter
with what set toPackage
are processed after the dictionary is interpreted. Thetransform()
method is given the instance ofPackage
as its only argument.Filters of type
TransformFilter
with what set todebian.changelog.ChangeBlock
are processed after each changelog block is loaded. Thetransform()
method is given the instance ofdebian.changelog.ChangeBlock
as its only argument.Filters of type
ExcludeFilter
with what set todebian.changelog.ChangeBlock
are processed while the changelog is loaded. If aChangeBlock
matches the exclusion, it is not included in the changelog.If repo is a path to a
repository
root, the package changelog will be loadable whenchangelog()
is invoked. See:changelog()
.