|
Packit Service |
21c75c |
..
|
|
Packit Service |
21c75c |
Copyright (C) 2014-2018 Red Hat, Inc.
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
This copyrighted material is made available to anyone wishing to use,
|
|
Packit Service |
21c75c |
modify, copy, or redistribute it subject to the terms and conditions of
|
|
Packit Service |
21c75c |
the GNU General Public License v.2, or (at your option) any later version.
|
|
Packit Service |
21c75c |
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
Packit Service |
21c75c |
ANY WARRANTY expressed or implied, including the implied warranties of
|
|
Packit Service |
21c75c |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
|
Packit Service |
21c75c |
Public License for more details. You should have received a copy of the
|
|
Packit Service |
21c75c |
GNU General Public License along with this program; if not, write to the
|
|
Packit Service |
21c75c |
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
Packit Service |
21c75c |
02110-1301, USA. Any Red Hat trademarks that are incorporated in the
|
|
Packit Service |
21c75c |
source code or documentation are not subject to the GNU General Public
|
|
Packit Service |
21c75c |
License and may only be used or replicated with the express permission of
|
|
Packit Service |
21c75c |
Red Hat, Inc.
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
=============================================
|
|
Packit Service |
21c75c |
Comps, or the Distribution Compose Metadata
|
|
Packit Service |
21c75c |
=============================================
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
.. module:: dnf.comps
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
.. class:: Comps
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
An object of this class can merge comps information from arbitrary repositories. It typically is instantiated from :class:`dnf.Base` and covers all the available repositories.
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
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.
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
.. attribute:: categories
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
List of all contained :class:`dnf.comps.Category` objects.
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
.. attribute:: environments
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
List of all contained :class:`dnf.comps.Environment` objects ordered by `display_order` tag defined in comps.xml file.
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
.. attribute:: groups
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
List of all contained :class:`dnf.comps.Group` objects ordered by `display_order` tag defined in comps.xml file.
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
.. method:: category_by_pattern(pattern, case_sensitive=False)
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
Returns a :class:`dnf.comps.Category` object matching `pattern`, or ``None``.
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
.. method:: categories_by_pattern(pattern, case_sensitive=False)
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
Return an iterable of :class:`dnf.comps.Category` objects matching `pattern`.
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
.. method:: categories_iter
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
Return iterator over all contained :class:`dnf.comps.Category` objects.
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
.. method:: environment_by_pattern(pattern, case_sensitive=False)
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
Return a :class:`dnf.comps.Environment` object matching `pattern`, or ``None``.
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
.. method:: environments_by_pattern(pattern, case_sensitive=False)
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
Return an iterable of :class:`dnf.comps.Environment` objects matching `pattern` ordered by `display_order` tag defined in comps.xml file.
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
.. attribute:: environments_iter
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
Return iterator over all contained :class:`dnf.comps.Environment` objects in order they appear in comps.xml file.
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
.. method:: group_by_pattern(pattern, case_sensitive=False)
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
Return a :class:`dnf.comps.Group` object matching `pattern`, or ``None``.
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
.. method:: groups_by_pattern(pattern, case_sensitive=False)
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
Return an iterable of :class:`dnf.comps.Group` objects matching `pattern` ordered by `display_order` tag defined in comps.xml file.
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
.. attribute:: groups_iter
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
Return iterator over all contained :class:`dnf.comps.Group` objects in order they appear in comps.xml file.
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
.. class:: Package
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
Represents comps package data.
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
.. NOTE::
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
Should not be confused with :class:`dnf.package.Package` which represents a package contained in a :class:`~.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.
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
.. attribute:: name
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
Name of the package.
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
.. attribute:: option_type
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
The type of inclusion of this particular package in its group. Must be one of the :data:`inclusion types <dnf.comps.CONDITIONAL>`.
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
.. class:: Category
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
.. attribute:: id
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
Unique identifier of the category.
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
.. attribute:: name
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
Name of the category.
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
.. attribute:: ui_name
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
The name of the category translated to the language given by the current locale.
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
.. attribute:: ui_description
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
The description of the category translated to the language given by the current locale.
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
.. class:: Environment
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
Has the same set of attributes as :class:`dnf.comps.Category`.
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
.. class:: Group
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
Has the same set of attributes as :class:`dnf.comps.Category`.
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
.. method:: packages_iter()
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
Return iterator over all :class:`packages <.Package>` belonging in this group.
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
Following types of inclusions of objects in their parent objects are defined:
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
.. data:: CONDITIONAL
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
.. data:: DEFAULT
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
.. data:: MANDATORY
|
|
Packit Service |
21c75c |
|
|
Packit Service |
21c75c |
.. data:: OPTIONAL
|