Comps, or the Distribution Compose Metadata

class dnf.comps.Comps

An object of this class can merge comps information from arbitrary repositories. It typically is instantiated from dnf.Base and covers all the available repositories.

The *_by_pattern methods all take a pattern and an optional case_sensitive parameter. The pattern is matched against names and IDs of objects in the domain (groups, categories, environments), the globbing characters in pattern retain their usual expanding meaning. If case_sensitive is True, matching is done in a case-sensitive manner.

categories

List of all contained dnf.comps.Category objects.

environments

List of all contained dnf.comps.Environment objects ordered by display_order tag defined in comps.xml file.

groups

List of all contained dnf.comps.Group objects ordered by display_order tag defined in comps.xml file.

category_by_pattern(pattern, case_sensitive=False)

Returns a dnf.comps.Category object matching pattern, or None.

categories_by_pattern(pattern, case_sensitive=False)

Return an iterable of dnf.comps.Category objects matching pattern.

categories_iter()

Return iterator over all contained dnf.comps.Category objects.

environment_by_pattern(pattern, case_sensitive=False)

Return a dnf.comps.Environment object matching pattern, or None.

environments_by_pattern(pattern, case_sensitive=False)

Return an iterable of dnf.comps.Environment objects matching pattern ordered by display_order tag defined in comps.xml file.

environments_iter

Return iterator over all contained dnf.comps.Environment objects in order they appear in comps.xml file.

group_by_pattern(pattern, case_sensitive=False)

Return a dnf.comps.Group object matching pattern, or None.

groups_by_pattern(pattern, case_sensitive=False)

Return an iterable of dnf.comps.Group objects matching pattern ordered by display_order tag defined in comps.xml file.

groups_iter

Return iterator over all contained dnf.comps.Group objects in order they appear in comps.xml file.

class dnf.comps.Package

Represents comps package data.

Note

Should not be confused with dnf.package.Package which represents a package contained in a Sack. There is no guarantee whether the comps package has a corresponding real sack package, i.e. there can be no package of given name in the sack, one such package, or more than one. For this reason two separate types are introduced.

name

Name of the package.

option_type

The type of inclusion of this particular package in its group. Must be one of the inclusion types.

class dnf.comps.Category
id

Unique identifier of the category.

name

Name of the category.

ui_name

The name of the category translated to the language given by the current locale.

ui_description

The description of the category translated to the language given by the current locale.

class dnf.comps.Environment

Has the same set of attributes as dnf.comps.Category.

class dnf.comps.Group

Has the same set of attributes as dnf.comps.Category.

packages_iter()

Return iterator over all packages belonging in this group.

Following types of inclusions of objects in their parent objects are defined:

dnf.comps.CONDITIONAL
dnf.comps.DEFAULT
dnf.comps.MANDATORY
dnf.comps.OPTIONAL