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.Baseand covers all the available repositories.The
*_by_patternmethods 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 isTrue, matching is done in a case-sensitive manner.- categories¶
List of all contained
dnf.comps.Categoryobjects.
- environments¶
List of all contained
dnf.comps.Environmentobjects ordered by display_order tag defined in comps.xml file.
- groups¶
List of all contained
dnf.comps.Groupobjects ordered by display_order tag defined in comps.xml file.
- category_by_pattern(pattern, case_sensitive=False)¶
Returns a
dnf.comps.Categoryobject matching pattern, orNone.
- categories_by_pattern(pattern, case_sensitive=False)¶
Return an iterable of
dnf.comps.Categoryobjects matching pattern.
- categories_iter()¶
Return iterator over all contained
dnf.comps.Categoryobjects.
- environment_by_pattern(pattern, case_sensitive=False)¶
Return a
dnf.comps.Environmentobject matching pattern, orNone.
- environments_by_pattern(pattern, case_sensitive=False)¶
Return an iterable of
dnf.comps.Environmentobjects matching pattern ordered by display_order tag defined in comps.xml file.
- environments_iter¶
Return iterator over all contained
dnf.comps.Environmentobjects in order they appear in comps.xml file.
- group_by_pattern(pattern, case_sensitive=False)¶
Return a
dnf.comps.Groupobject matching pattern, orNone.
- groups_by_pattern(pattern, case_sensitive=False)¶
Return an iterable of
dnf.comps.Groupobjects matching pattern ordered by display_order tag defined in comps.xml file.
- groups_iter¶
Return iterator over all contained
dnf.comps.Groupobjects in order they appear in comps.xml file.
- class dnf.comps.Package¶
Represents comps package data.
Note
Should not be confused with
dnf.package.Packagewhich represents a package contained in aSack. 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.
Following types of inclusions of objects in their parent objects are defined:
- dnf.comps.CONDITIONAL¶
- dnf.comps.DEFAULT¶
- dnf.comps.MANDATORY¶
- dnf.comps.OPTIONAL¶