|
Packit |
6f3914 |
# conf.py
|
|
Packit |
6f3914 |
# dnf configuration classes.
|
|
Packit |
6f3914 |
#
|
|
Packit |
6f3914 |
# Copyright (C) 2012-2016 Red Hat, Inc.
|
|
Packit |
6f3914 |
#
|
|
Packit |
6f3914 |
# This copyrighted material is made available to anyone wishing to use,
|
|
Packit |
6f3914 |
# modify, copy, or redistribute it subject to the terms and conditions of
|
|
Packit |
6f3914 |
# the GNU General Public License v.2, or (at your option) any later version.
|
|
Packit |
6f3914 |
# This program is distributed in the hope that it will be useful, but WITHOUT
|
|
Packit |
6f3914 |
# ANY WARRANTY expressed or implied, including the implied warranties of
|
|
Packit |
6f3914 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
|
Packit |
6f3914 |
# Public License for more details. You should have received a copy of the
|
|
Packit |
6f3914 |
# GNU General Public License along with this program; if not, write to the
|
|
Packit |
6f3914 |
# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
Packit |
6f3914 |
# 02110-1301, USA. Any Red Hat trademarks that are incorporated in the
|
|
Packit |
6f3914 |
# source code or documentation are not subject to the GNU General Public
|
|
Packit |
6f3914 |
# License and may only be used or replicated with the express permission of
|
|
Packit |
6f3914 |
# Red Hat, Inc.
|
|
Packit |
6f3914 |
#
|
|
Packit |
6f3914 |
|
|
Packit |
6f3914 |
|
|
Packit |
6f3914 |
"""
|
|
Packit |
6f3914 |
The configuration classes and routines in yum are splattered over too many
|
|
Packit |
6f3914 |
places, hard to change and debug. The new structure here will replace that. Its
|
|
Packit |
6f3914 |
goal is to:
|
|
Packit |
6f3914 |
|
|
Packit |
6f3914 |
* accept configuration options from all three sources (the main config file,
|
|
Packit |
6f3914 |
repo config files, command line switches)
|
|
Packit |
6f3914 |
* handle all the logic of storing those and producing related values.
|
|
Packit |
6f3914 |
* returning configuration values.
|
|
Packit |
6f3914 |
* optionally: asserting no value is overridden once it has been applied
|
|
Packit |
6f3914 |
somewhere (e.g. do not let a new repo be initialized with different global
|
|
Packit |
6f3914 |
cache path than an already existing one).
|
|
Packit |
6f3914 |
|
|
Packit |
6f3914 |
"""
|
|
Packit |
6f3914 |
|
|
Packit |
6f3914 |
from __future__ import absolute_import
|
|
Packit |
6f3914 |
from __future__ import unicode_literals
|
|
Packit |
6f3914 |
|
|
Packit |
6f3914 |
from dnf.conf.config import PRIO_DEFAULT, PRIO_MAINCONFIG, PRIO_AUTOMATICCONFIG
|
|
Packit |
6f3914 |
from dnf.conf.config import PRIO_REPOCONFIG, PRIO_PLUGINDEFAULT, PRIO_PLUGINCONFIG
|
|
Packit |
6f3914 |
from dnf.conf.config import PRIO_COMMANDLINE, PRIO_RUNTIME
|
|
Packit |
6f3914 |
|
|
Packit |
6f3914 |
from dnf.conf.config import BaseConfig, MainConf, RepoConf
|
|
Packit |
6f3914 |
|
|
Packit |
6f3914 |
Conf = MainConf
|