libdnf5.conf
- libdnf5.conf.BUGTRACKER
- libdnf5.conf.CONF_DIRECTORY
- libdnf5.conf.CONF_FILENAME
- class libdnf5.conf.Config
Base class for configurations objects
- load_from_parser(parser, section, vars, logger, priority)
- opt_binds()
- thisown
- class libdnf5.conf.ConfigMain
Holds global configuration
- get_allow_downgrade_option(*args)
- get_allow_vendor_change_option(*args)
- get_assumeno_option(*args)
- get_assumeyes_option(*args)
- get_autocheck_running_kernel_option(*args)
- get_bandwidth_option(*args)
- get_best_option(*args)
- get_bugtracker_url_option(*args)
- get_build_cache_option(*args)
- get_cachedir_option(*args)
- get_cacheonly_option(*args)
- get_check_config_file_age_option(*args)
- get_clean_requirements_on_remove_option(*args)
- get_color_list_available_downgrade_option(*args)
- get_color_list_available_install_option(*args)
- get_color_list_available_reinstall_option(*args)
- get_color_list_available_upgrade_option(*args)
- get_color_list_installed_extra_option(*args)
- get_color_list_installed_newer_option(*args)
- get_color_list_installed_older_option(*args)
- get_color_list_installed_reinstall_option(*args)
- get_color_option(*args)
- get_color_search_match_option(*args)
- get_color_update_installed_option(*args)
- get_color_update_local_option(*args)
- get_color_update_remote_option(*args)
- get_comment_option(*args)
- get_config_file_path_option(*args)
- get_countme_option(*args)
- get_debug_solver_option(*args)
- get_debugdir_option(*args)
- get_debuglevel_option(*args)
- get_defaultyes_option(*args)
- get_deltarpm_option(*args)
Overload 1: Deprecated: The option does nothing
Overload 2: Deprecated: The option does nothing
- get_deltarpm_percentage_option(*args)
Overload 1: Deprecated: The option does nothing
Overload 2: Deprecated: The option does nothing
- get_destdir_option(*args)
- get_disable_excludes_option(*args)
- get_diskspacecheck_option(*args)
- get_downloadonly_option(*args)
- get_enabled_option(*args)
Overload 1: Deprecated: Use ConfigRepo::get_enabled_option()
Overload 2: Deprecated: Use ConfigRepo::get_enabled_option() const
- get_enablegroups_option(*args)
- get_errorlevel_option(*args)
Overload 1: Deprecated: The option does nothing
Overload 2: Deprecated: The option does nothing
- get_exclude_from_weak_autodetect_option(*args)
- get_exclude_from_weak_option(*args)
- get_excludeenvs_option(*args)
- get_excludegroups_option(*args)
- get_excludepkgs_option(*args)
- get_exit_on_lock_option(*args)
- get_fastestmirror_option(*args)
- get_gpgcheck_option(*args)
Overload 1: Deprecated: Use get_pkg_gpgcheck_option()
Overload 2: Deprecated: Use get_pkg_gpgcheck_option() const
- get_gpgkey_dns_verification_option(*args)
- get_group_package_types_option(*args)
- get_history_list_view_option(*args)
- get_history_record_option(*args)
- get_history_record_packages_option(*args)
- get_ignorearch_option(*args)
- get_includepkgs_option(*args)
- get_install_weak_deps_option(*args)
- get_installonly_limit_option(*args)
- get_installonlypkgs_option(*args)
- get_installroot_option(*args)
- get_ip_resolve_option(*args)
- get_keepcache_option(*args)
- get_localpkg_gpgcheck_option(*args)
- get_log_rotate_option(*args)
- get_log_size_option(*args)
- get_logdir_option(*args)
- get_max_downloads_per_mirror_option(*args)
- get_max_parallel_downloads_option(*args)
- get_metadata_expire_option(*args)
- get_metadata_timer_sync_option(*args)
Overload 1: Deprecated: The metadata_timer_sync option does nothing
Overload 2: Deprecated: The metadata_timer_sync option does nothing
- get_minrate_option(*args)
- get_module_obsoletes_option(*args)
- get_module_platform_id_option(*args)
- get_module_stream_switch_option(*args)
- get_multilib_policy_option(*args)
- get_obsoletes_option(*args)
- get_optional_metadata_types_option(*args)
- get_password_option(*args)
- get_persistdir_option(*args)
- get_pkg_gpgcheck_option(*args)
- get_plugin_conf_dir_option(*args)
- get_pluginconfpath_option(*args)
Overload 1: Deprecated: Use get_plugin_conf_dir_option() instead. The new method allows defining a list of directories.
Overload 2: Deprecated: Use get_plugin_conf_dir_option() instead. The new method allows defining a list of directories.
- get_pluginpath_option(*args)
- get_plugins_option(*args)
- get_protect_running_kernel_option(*args)
- get_protected_packages_option(*args)
- get_proxy_auth_method_option(*args)
- get_proxy_option(*args)
- get_proxy_password_option(*args)
- get_proxy_sslcacert_option(*args)
- get_proxy_sslclientcert_option(*args)
- get_proxy_sslclientkey_option(*args)
- get_proxy_sslverify_option(*args)
- get_proxy_username_option(*args)
- get_recent_option(*args)
- get_repo_gpgcheck_option(*args)
- get_reposdir_option(*args)
- get_reset_nice_option(*args)
- get_retries_option(*args)
Overload 1: Deprecated: The option does nothing
Overload 2: Deprecated: The option does nothing
- get_rpmverbosity_option(*args)
- get_skip_broken_option(*args)
- get_skip_system_repo_lock_option(*args)
- get_sslcacert_option(*args)
- get_sslclientcert_option(*args)
- get_sslclientkey_option(*args)
- get_sslverify_option(*args)
- get_strict_option(*args)
Overload 1: Deprecated: Use get_skip_broken_option() and get_skip_unavailable_option()
Overload 2: Deprecated: Use get_skip_broken_option() const and get_skip_unavailable_option() const
- get_system_cachedir_option(*args)
- get_system_state_dir_option(*args)
- get_throttle_option(*args)
- get_timeout_option(*args)
- get_transaction_history_dir_option(*args)
- get_transformdb_option(*args)
- get_tsflags_option(*args)
- get_upgrade_group_objects_upgrade_option(*args)
- get_use_host_config_option(*args)
- get_user_agent_option(*args)
- get_username_option(*args)
- get_varsdir_option(*args)
- get_zchunk_option(*args)
- load_from_config(other)
For each option, set the option value to the value from other. An option will only be set if its priority in other is greater or equal to the current priority and the option in other is not empty.
- load_from_parser(*args)
- thisown
- class libdnf5.conf.ConfigParser(*args)
Class for parsing dnf/yum .ini configuration files.
ConfigParser is used for parsing files. User can get both substituted and original parsed values. The parsed items are stored into the PreserveOrderMap. ConfigParser preserve order of items. Comments and empty lines are kept.
- add_comment_line(*args)
- add_section(*args)
- get_data(*args)
- get_header(*args)
- get_value(section, key)
- has_option(section, key)
- has_section(section)
- read(file_path)
Reads/parse one INI file
Can be called repeately for reading/merge more INI files.
- Parameters:
file_path (string) – Name (with path) of file to read
- remove_option(section, key)
- remove_section(section)
- set_value(*args)
- thisown
- write(*args)
Overload 1:
Writes all data (all sections) to INI file
- Parameters:
file_path (string) – Name (with path) of file to write
append (boolean) – If true, existent file will be appended, otherwise overwritten
Overload 2:
Writes one section data to INI file
- Parameters:
file_path (string) – Name (with path) of file to write
append (boolean) – If true, existent file will be appended, otherwise overwritten
section (string) – Section to write
- libdnf5.conf.GROUP_PACKAGE_TYPES
- libdnf5.conf.INSTALLONLYPKGS
- class libdnf5.conf.Item(*args, **kwargs)
Extends the option with user-defined functions for processing a new value and converting value to a string. It is used as additional level of processing when the option is accessed by its text name.
- get_is_append_option()
- get_priority()
- get_value_string()
- new_string(priority, value)
- thisown
- class libdnf5.conf.LibraryVersion
Library version Since: 5.0 PRIME version - completely changing API and everything in dnf (hopefully stays as a 5 for the foreseeable future) MAJOR version - incompatible API changes MINOR version - add functionality in a backward compatible manner MICRO version - make backward compatible bug fixes
- major
- micro
- minor
- prime
- thisown
- libdnf5.conf.METADATA_TYPE_ALL
- libdnf5.conf.METADATA_TYPE_APPSTREAM
- libdnf5.conf.METADATA_TYPE_COMPS
- libdnf5.conf.METADATA_TYPE_FILELISTS
- libdnf5.conf.METADATA_TYPE_OTHER
- libdnf5.conf.METADATA_TYPE_PRESTO
- libdnf5.conf.METADATA_TYPE_UPDATEINFO
- libdnf5.conf.OPTIONAL_METADATA_TYPES
- class libdnf5.conf.Option(*args, **kwargs)
Option class is an abstract class. Parent of all options. Options are used to store a configuration.
- Priority_AUTOMATICCONFIG
- Priority_COMMANDLINE
- Priority_DEFAULT
- Priority_EMPTY
- Priority_INSTALLROOT
- Priority_MAINCONFIG
- Priority_PLUGINCONFIG
- Priority_PLUGINDEFAULT
- Priority_REPOCONFIG
- Priority_RUNTIME
- assert_not_locked()
Asserts the option is not locked and throws a libdnf5::UserAssertionError in case it is.
Since: 1.0
- clone()
Makes copy (clone) of this object.
- empty()
Checks if the option is empty (has no stored value).
- get_priority()
Returns priority (source) of the stored value.
- get_value_string()
Gets a string representation of the stored value.
- is_locked()
Checks if the option is locked.
- Return type:
boolean
- Returns:
‘true’ if the option is locked
Since: 1.0
- lock(first_comment)
Locks the option. The locked option is read-only. Its value cannot be changed.
- Parameters:
first_comment (string) – The comment will be saved when lock() is first called
Since: 1.0
- set(*args)
Overload 1: Parses input string and sets new value and priority (source). The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 2: Parses input string and sets new value and runtime priority.
- thisown
- class libdnf5.conf.OptionBinds(*args)
Maps the options names (text names read from config file, command line, …) to options objects. Supports user defined functions for processing new value and converting value to string.
- at(*args)
- begin()
- empty()
- end()
- find(id)
- size()
- thisown
- libdnf5.conf.OptionBinds__iter__(self)
- class libdnf5.conf.OptionBool(*args)
Option that stores boolean value. Supports default value. Conversion from string to bool is done according to vectors which contains strings of true and false values. Conversion is case insensitive for input. Values must be lower case in vectors.
- clone()
Makes copy (clone) of this object.
- from_string(value)
Parses input string and returns result.
- static get_default_false_values()
Returns vector with default strings used for conversion from string to “false” bool value.
- static get_default_true_values()
Returns vector with default strings used for conversion from string to “true” bool value.
- get_default_value()
Gets the default value. Default value is used until it is replaced by set() method.
- get_false_values()
Returns vector with strings used for conversion from string to “false” bool value.
- get_true_values()
Returns vector with strings used for conversion from string to “true” bool value.
- get_value()
Gets the stored value.
- get_value_string()
Gets a string representation of the stored value.
- set(*args)
Overload 1: Sets new value and priority (source). The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 2: Sets new value with the runtime priority.
Overload 3: Parses input string and sets new value and priority. The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 4: Parses input string and sets new value and runtime priority.
- test(arg2)
Does nothing. But it must be present for compatibility with other option types.
- thisown
- to_string(value)
Converts input value to the string.
- class libdnf5.conf.OptionChildBool(parent)
Option that links option to another option. It uses default value and parameters from linked option. If it is empty (has no stored value), uses value from the linked option (parent). Parent option type is template parameter.
- clone()
Makes copy (clone) of this object.
- empty()
Checks if the option is empty (has no stored value). If it is empty, checks status of the parent.
- get_default_value()
Gets the default value from parent. Default value is used until it is replaced by set() method.
- get_priority()
Returns priority (source) of the stored value. If no value is stored, priority from the parent is returned.
- get_value()
Gets the stored value. If no value is stored, value from the parent is returned.
- get_value_string()
Gets a string representation of the stored value. If no value is stored, value from the parent is returned.
- set(*args)
Overload 1: Sets new value and priority (source). The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 2: Sets new value and runtime priority.
Overload 3: Sets new value and priority (source). The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 4: Sets new value and runtime priority.
- thisown
- class libdnf5.conf.OptionChildEnum(parent)
Option that links option to another option. It uses default value and parameters from linked option. If it is empty (has no stored value), uses value from the linked option (parent). Parent option type is template parameter.
- clone()
Makes copy (clone) of this object.
- empty()
Checks if the option is empty (has no stored value). If it is empty, checks status of the parent.
- get_default_value()
Gets the default value from parent. Default value is used until it is replaced by set() method.
- get_priority()
Returns priority (source) of the stored value. If no value is stored, priority from the parent is returned.
- get_value()
Gets the stored value. If no value is stored, value from the parent is returned.
- get_value_string()
Gets a string representation of the stored value. If no value is stored, value from the parent is returned.
- set(*args)
Overload 1: Sets new value and priority (source). The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 2: Sets new value and runtime priority.
Overload 3: Sets new value and priority (source). The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 4: Sets new value and runtime priority.
- thisown
- class libdnf5.conf.OptionChildNumberFloat(parent)
Option that links option to another option. It uses default value and parameters from linked option. If it is empty (has no stored value), uses value from the linked option (parent). Parent option type is template parameter.
- clone()
Makes copy (clone) of this object.
- empty()
Checks if the option is empty (has no stored value). If it is empty, checks status of the parent.
- get_default_value()
Gets the default value from parent. Default value is used until it is replaced by set() method.
- get_priority()
Returns priority (source) of the stored value. If no value is stored, priority from the parent is returned.
- get_value()
Gets the stored value. If no value is stored, value from the parent is returned.
- get_value_string()
Gets a string representation of the stored value. If no value is stored, value from the parent is returned.
- set(*args)
Overload 1: Sets new value and priority (source). The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 2: Sets new value and runtime priority.
Overload 3: Sets new value and priority (source). The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 4: Sets new value and runtime priority.
- thisown
- class libdnf5.conf.OptionChildNumberInt32(parent)
Option that links option to another option. It uses default value and parameters from linked option. If it is empty (has no stored value), uses value from the linked option (parent). Parent option type is template parameter.
- clone()
Makes copy (clone) of this object.
- empty()
Checks if the option is empty (has no stored value). If it is empty, checks status of the parent.
- get_default_value()
Gets the default value from parent. Default value is used until it is replaced by set() method.
- get_priority()
Returns priority (source) of the stored value. If no value is stored, priority from the parent is returned.
- get_value()
Gets the stored value. If no value is stored, value from the parent is returned.
- get_value_string()
Gets a string representation of the stored value. If no value is stored, value from the parent is returned.
- set(*args)
Overload 1: Sets new value and priority (source). The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 2: Sets new value and runtime priority.
Overload 3: Sets new value and priority (source). The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 4: Sets new value and runtime priority.
- thisown
- class libdnf5.conf.OptionChildNumberUInt32(parent)
Option that links option to another option. It uses default value and parameters from linked option. If it is empty (has no stored value), uses value from the linked option (parent). Parent option type is template parameter.
- clone()
Makes copy (clone) of this object.
- empty()
Checks if the option is empty (has no stored value). If it is empty, checks status of the parent.
- get_default_value()
Gets the default value from parent. Default value is used until it is replaced by set() method.
- get_priority()
Returns priority (source) of the stored value. If no value is stored, priority from the parent is returned.
- get_value()
Gets the stored value. If no value is stored, value from the parent is returned.
- get_value_string()
Gets a string representation of the stored value. If no value is stored, value from the parent is returned.
- set(*args)
Overload 1: Sets new value and priority (source). The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 2: Sets new value and runtime priority.
Overload 3: Sets new value and priority (source). The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 4: Sets new value and runtime priority.
- thisown
- class libdnf5.conf.OptionChildSeconds(parent)
Option that links option to another option. It uses default value and parameters from linked option. If it is empty (has no stored value), uses value from the linked option (parent). Parent option type is template parameter.
- clone()
Makes copy (clone) of this object.
- empty()
Checks if the option is empty (has no stored value). If it is empty, checks status of the parent.
- get_default_value()
Gets the default value from parent. Default value is used until it is replaced by set() method.
- get_priority()
Returns priority (source) of the stored value. If no value is stored, priority from the parent is returned.
- get_value()
Gets the stored value. If no value is stored, value from the parent is returned.
- get_value_string()
Gets a string representation of the stored value. If no value is stored, value from the parent is returned.
- set(*args)
Overload 1: Sets new value and priority (source). The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 2: Sets new value and runtime priority.
Overload 3: Sets new value and priority (source). The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 4: Sets new value and runtime priority.
- thisown
- class libdnf5.conf.OptionChildString(parent)
Option that links option to another option. It uses default value and parameters from linked option. If it is empty (has no stored value), uses value from the linked option (parent). Parent option type is template parameter.
- clone()
Makes copy (clone) of this object.
- empty()
Checks if the option is empty (has no stored value). If it is empty, checks status of the parent.
- get_default_value()
Gets the default value from parent. Default value is used until it is replaced by set() method.
- get_priority()
Returns priority (source) of the stored value. If no value is stored, priority from the parent is returned.
- get_value()
Gets the stored value. If no value is stored, value from the parent is returned.
- get_value_string()
Gets a string representation of the stored value. If no value is stored, value from the parent is returned.
- set(*args)
Overload 1: Sets new value and priority (source). The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 2: Sets new value and runtime priority.
Overload 3: Sets new value and priority (source). The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 4: Sets new value and runtime priority.
- thisown
- class libdnf5.conf.OptionChildStringAppendList(parent)
Option that links option to another option. It uses default value and parameters from linked option. If it is empty (has no stored value), uses value from the linked option (parent). Parent option type is template parameter.
- clone()
Makes copy (clone) of this object.
- empty()
Checks if the option is empty (has no stored value). If it is empty, checks status of the parent.
- get_default_value()
Gets the default value from parent. Default value is used until it is replaced by set() method.
- get_priority()
Returns priority (source) of the stored value. If no value is stored, priority from the parent is returned.
- get_value()
Gets the stored value. If no value is stored, value from the parent is returned.
- get_value_string()
Gets a string representation of the stored value. If no value is stored, value from the parent is returned.
- set(*args)
Overload 1: Sets new value and priority (source). The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 2: Sets new value and runtime priority.
Overload 3: Sets new value and priority (source). The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 4: Sets new value and runtime priority.
- thisown
- class libdnf5.conf.OptionChildStringAppendSet(parent)
Option that links option to another option. It uses default value and parameters from linked option. If it is empty (has no stored value), uses value from the linked option (parent). Parent option type is template parameter.
- clone()
Makes copy (clone) of this object.
- empty()
Checks if the option is empty (has no stored value). If it is empty, checks status of the parent.
- get_default_value()
Gets the default value from parent. Default value is used until it is replaced by set() method.
- get_priority()
Returns priority (source) of the stored value. If no value is stored, priority from the parent is returned.
- get_value()
Gets the stored value. If no value is stored, value from the parent is returned.
- get_value_string()
Gets a string representation of the stored value. If no value is stored, value from the parent is returned.
- set(*args)
Overload 1: Sets new value and priority (source). The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 2: Sets new value and runtime priority.
Overload 3: Sets new value and priority (source). The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 4: Sets new value and runtime priority.
- thisown
- class libdnf5.conf.OptionChildStringList(parent)
Option that links option to another option. It uses default value and parameters from linked option. If it is empty (has no stored value), uses value from the linked option (parent). Parent option type is template parameter.
- clone()
Makes copy (clone) of this object.
- empty()
Checks if the option is empty (has no stored value). If it is empty, checks status of the parent.
- get_default_value()
Gets the default value from parent. Default value is used until it is replaced by set() method.
- get_priority()
Returns priority (source) of the stored value. If no value is stored, priority from the parent is returned.
- get_value()
Gets the stored value. If no value is stored, value from the parent is returned.
- get_value_string()
Gets a string representation of the stored value. If no value is stored, value from the parent is returned.
- set(*args)
Overload 1: Sets new value and priority (source). The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 2: Sets new value and runtime priority.
Overload 3: Sets new value and priority (source). The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 4: Sets new value and runtime priority.
- thisown
- class libdnf5.conf.OptionChildStringSet(parent)
Option that links option to another option. It uses default value and parameters from linked option. If it is empty (has no stored value), uses value from the linked option (parent). Parent option type is template parameter.
- clone()
Makes copy (clone) of this object.
- empty()
Checks if the option is empty (has no stored value). If it is empty, checks status of the parent.
- get_default_value()
Gets the default value from parent. Default value is used until it is replaced by set() method.
- get_priority()
Returns priority (source) of the stored value. If no value is stored, priority from the parent is returned.
- get_value()
Gets the stored value. If no value is stored, value from the parent is returned.
- get_value_string()
Gets a string representation of the stored value. If no value is stored, value from the parent is returned.
- set(*args)
Overload 1: Sets new value and priority (source). The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 2: Sets new value and runtime priority.
Overload 3: Sets new value and priority (source). The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 4: Sets new value and runtime priority.
- thisown
- class libdnf5.conf.OptionEnum(*args)
Option that stores value from enumeration of strings. It supports default value. It supports user defined function for conversion from string.
- clone()
Makes copy (clone) of this object.
- from_string(value)
Parses input string and returns result.
- get_default_value()
Gets the default value. Default value is used until it is replaced by set() method.
- get_value()
Gets the stored value.
- get_value_string()
Gets a string representation of the stored value.
- set(*args)
Overload 1: Parses input string and sets new value and priority. The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 2: Parses input string and sets new value and runtime priority.
- test(value)
Tests input value and throws exception if the value is not allowed.
- thisown
- class libdnf5.conf.OptionNumberFloat(*args)
Option that stores numerical value. The type of value is template parameter. Support default value, minimal and maximal values, user defined function for conversion from string.
- clone()
Makes copy (clone) of this object.
- from_string(value)
Parses input string and returns result.
- get_default_value()
Gets the default value. Default value is used until it is replaced by set() method.
- get_value()
Gets the stored value.
- get_value_string()
Gets a string representation of the stored value.
- set(*args)
Overload 1: Sets new value and priority (source). The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 2: Sets new value and runtime priority.
Overload 3: Parses input string and sets new value and priority. The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 4: Parses input string and sets new value and runtime priority.
- test(value)
Tests input value and throws exception if the value is not allowed.
- thisown
- to_string(value)
Converts input value to the string.
- class libdnf5.conf.OptionNumberInt32(*args)
Option that stores numerical value. The type of value is template parameter. Support default value, minimal and maximal values, user defined function for conversion from string.
- clone()
Makes copy (clone) of this object.
- from_string(value)
Parses input string and returns result.
- get_default_value()
Gets the default value. Default value is used until it is replaced by set() method.
- get_value()
Gets the stored value.
- get_value_string()
Gets a string representation of the stored value.
- set(*args)
Overload 1: Sets new value and priority (source). The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 2: Sets new value and runtime priority.
Overload 3: Parses input string and sets new value and priority. The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 4: Parses input string and sets new value and runtime priority.
- test(value)
Tests input value and throws exception if the value is not allowed.
- thisown
- to_string(value)
Converts input value to the string.
- class libdnf5.conf.OptionNumberInt64(*args)
Option that stores numerical value. The type of value is template parameter. Support default value, minimal and maximal values, user defined function for conversion from string.
- clone()
Makes copy (clone) of this object.
- from_string(value)
Parses input string and returns result.
- get_default_value()
Gets the default value. Default value is used until it is replaced by set() method.
- get_value()
Gets the stored value.
- get_value_string()
Gets a string representation of the stored value.
- set(*args)
Overload 1: Sets new value and priority (source). The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 2: Sets new value and runtime priority.
Overload 3: Parses input string and sets new value and priority. The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 4: Parses input string and sets new value and runtime priority.
- test(value)
Tests input value and throws exception if the value is not allowed.
- thisown
- to_string(value)
Converts input value to the string.
- class libdnf5.conf.OptionNumberUInt32(*args)
Option that stores numerical value. The type of value is template parameter. Support default value, minimal and maximal values, user defined function for conversion from string.
- clone()
Makes copy (clone) of this object.
- from_string(value)
Parses input string and returns result.
- get_default_value()
Gets the default value. Default value is used until it is replaced by set() method.
- get_value()
Gets the stored value.
- get_value_string()
Gets a string representation of the stored value.
- set(*args)
Overload 1: Sets new value and priority (source). The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 2: Sets new value and runtime priority.
Overload 3: Parses input string and sets new value and priority. The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 4: Parses input string and sets new value and runtime priority.
- test(value)
Tests input value and throws exception if the value is not allowed.
- thisown
- to_string(value)
Converts input value to the string.
- class libdnf5.conf.OptionNumberUInt64(*args)
Option that stores numerical value. The type of value is template parameter. Support default value, minimal and maximal values, user defined function for conversion from string.
- clone()
Makes copy (clone) of this object.
- from_string(value)
Parses input string and returns result.
- get_default_value()
Gets the default value. Default value is used until it is replaced by set() method.
- get_value()
Gets the stored value.
- get_value_string()
Gets a string representation of the stored value.
- set(*args)
Overload 1: Sets new value and priority (source). The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 2: Sets new value and runtime priority.
Overload 3: Parses input string and sets new value and priority. The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 4: Parses input string and sets new value and runtime priority.
- test(value)
Tests input value and throws exception if the value is not allowed.
- thisown
- to_string(value)
Converts input value to the string.
- class libdnf5.conf.OptionPath(*args)
Option that stores file/directory path. Support default value, and path verification (absolute, existence).
- clone()
Makes copy (clone) of this object.
- set(*args)
Overload 1: Parses input string and sets new value and priority. According setting passed in constructor it can verify that the path is absolute, exists and match regex. The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 2: Parses input string and sets new value and runtime priority.
- test(value)
Tests input value and throws exception if the value is not allowed.
- thisown
- class libdnf5.conf.OptionSeconds(*args)
Option that stores an integer value of seconds. Support default value, minimal and maximal values.
- clone()
Makes copy (clone) of this object.
- from_string(value)
Parses input string and returns result.
- set(*args)
Overload 1: Sets new value and priority (source). The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 2: Sets new value and runtime priority.
Overload 3: Parses input string and sets new value and priority. Valid inputs: 100, 1.5m, 90s, 1.2d, 1d, 0xF, 0.1, -1, never. Invalid inputs: -10, -0.1, 45.6Z, 1d6h, 1day, 1y. The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 4: Parses input string and sets new value and runtime priority.
- thisown
- class libdnf5.conf.OptionString(*args)
Option that stores string value. Support default value, and check of an input value using the regular expression
- clone()
Makes copy (clone) of this object.
- from_string(value)
Returns copy of input string. Must be present for compatibility with other option types.
- get_default_value()
Gets the default value. Default value is used until it is replaced by set() method.
- get_value()
Gets the stored value.
- get_value_string()
Gets a string representation of the stored value.
- set(*args)
Overload 1: Sets new value and priority. The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 2: Sets new value and runtime priority.
- test(value)
Tests input value and throws exception if the value is not allowed.
- thisown
- class libdnf5.conf.OptionStringAppendList(*args)
Option that stores a container of strings. The type of the container is a template parameter. Non-type IsAppend template parameter is used to distinguish between regular list-like options (e.g. OptionStringList, OptionStringSet) and append options (e.g. OptionStringAppendList, OptionStringAppendSet). Support default value, and check of an input value using the regular expression.
- add(*args)
Overload 1: Adds items from an another container. New items are stored in the container value
Overload 2: Parses input string and adds new values and priority. The value and priority are stored only if the new priority is equal to or higher than the stored priority.
- add_item(priority, item)
Adds new item to the container. New item is stored in the container value
- clone()
Makes copy (clone) of this object.
- from_string(value)
Parses input string and returns a container of items.
Items in the input string are separated by delimiters (default: space, comma, newline). Leading and trailing whitespace is trimmed from each item. Backslash ‘' can be used to escape any character, allowing it to be included literally in items.
Special case: If the string starts with a non-space delimiter, an empty item is inserted as the first element, which can be used to clear existing option content.
- Parameters:
value (string) – The input string to parse
- Return type:
libdnf5::OptionStringContainer< std::vector< std::string >,true >::ValueType
- Returns:
Container with parsed items
- static get_default_delimiters()
Returns the default delimiters
- get_default_value()
Gets the default value. Default value is used until it is replaced by set() method.
- get_delimiters()
Return delimiters of this OptionStringList
- get_value()
Gets the stored value.
- get_value_string()
Gets a string representation of the stored value.
- set(*args)
Overload 1: Sets new value and priority (source). The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 2: Sets new value and runtime priority.
Overload 3: Parses input string and sets new value and priority. The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 4: Parses input string and sets new value and runtime priority.
- test(value)
Tests input value and throws exception if the value is not allowed.
- thisown
- to_string(value)
Converts input container of string items to a single string. Items are joined using the first delimiter character. Backslashes and delimiter characters within items are escaped with a backslash.
- class libdnf5.conf.OptionStringAppendSet(*args)
Option that stores a container of strings. The type of the container is a template parameter. Non-type IsAppend template parameter is used to distinguish between regular list-like options (e.g. OptionStringList, OptionStringSet) and append options (e.g. OptionStringAppendList, OptionStringAppendSet). Support default value, and check of an input value using the regular expression.
- add(*args)
Overload 1: Adds items from an another container. New items are stored in the container value
Overload 2: Parses input string and adds new values and priority. The value and priority are stored only if the new priority is equal to or higher than the stored priority.
- add_item(priority, item)
Adds new item to the container. New item is stored in the container value
- clone()
Makes copy (clone) of this object.
- from_string(value)
Parses input string and returns a container of items.
Items in the input string are separated by delimiters (default: space, comma, newline). Leading and trailing whitespace is trimmed from each item. Backslash ‘' can be used to escape any character, allowing it to be included literally in items.
Special case: If the string starts with a non-space delimiter, an empty item is inserted as the first element, which can be used to clear existing option content.
- Parameters:
value (string) – The input string to parse
- Return type:
libdnf5::OptionStringContainer< std::set< std::string >,true >::ValueType
- Returns:
Container with parsed items
- static get_default_delimiters()
Returns the default delimiters
- get_default_value()
Gets the default value. Default value is used until it is replaced by set() method.
- get_delimiters()
Return delimiters of this OptionStringList
- get_value()
Gets the stored value.
- get_value_string()
Gets a string representation of the stored value.
- set(*args)
Overload 1: Sets new value and priority (source). The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 2: Sets new value and runtime priority.
Overload 3: Parses input string and sets new value and priority. The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 4: Parses input string and sets new value and runtime priority.
- test(value)
Tests input value and throws exception if the value is not allowed.
- thisown
- to_string(value)
Converts input container of string items to a single string. Items are joined using the first delimiter character. Backslashes and delimiter characters within items are escaped with a backslash.
- class libdnf5.conf.OptionStringList(*args)
Option that stores a container of strings. The type of the container is a template parameter. Non-type IsAppend template parameter is used to distinguish between regular list-like options (e.g. OptionStringList, OptionStringSet) and append options (e.g. OptionStringAppendList, OptionStringAppendSet). Support default value, and check of an input value using the regular expression.
- add(*args)
Overload 1: Adds items from an another container. New items are stored in the container value
Overload 2: Parses input string and adds new values and priority. The value and priority are stored only if the new priority is equal to or higher than the stored priority.
- add_item(priority, item)
Adds new item to the container. New item is stored in the container value
- clone()
Makes copy (clone) of this object.
- from_string(value)
Parses input string and returns a container of items.
Items in the input string are separated by delimiters (default: space, comma, newline). Leading and trailing whitespace is trimmed from each item. Backslash ‘' can be used to escape any character, allowing it to be included literally in items.
Special case: If the string starts with a non-space delimiter, an empty item is inserted as the first element, which can be used to clear existing option content.
- Parameters:
value (string) – The input string to parse
- Return type:
libdnf5::OptionStringContainer< std::vector< std::string >,false >::ValueType
- Returns:
Container with parsed items
- static get_default_delimiters()
Returns the default delimiters
- get_default_value()
Gets the default value. Default value is used until it is replaced by set() method.
- get_delimiters()
Return delimiters of this OptionStringList
- get_value()
Gets the stored value.
- get_value_string()
Gets a string representation of the stored value.
- set(*args)
Overload 1: Sets new value and priority (source). The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 2: Sets new value and runtime priority.
Overload 3: Parses input string and sets new value and priority. The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 4: Parses input string and sets new value and runtime priority.
- test(value)
Tests input value and throws exception if the value is not allowed.
- thisown
- to_string(value)
Converts input container of string items to a single string. Items are joined using the first delimiter character. Backslashes and delimiter characters within items are escaped with a backslash.
- class libdnf5.conf.OptionStringSet(*args)
Option that stores a container of strings. The type of the container is a template parameter. Non-type IsAppend template parameter is used to distinguish between regular list-like options (e.g. OptionStringList, OptionStringSet) and append options (e.g. OptionStringAppendList, OptionStringAppendSet). Support default value, and check of an input value using the regular expression.
- add(*args)
Overload 1: Adds items from an another container. New items are stored in the container value
Overload 2: Parses input string and adds new values and priority. The value and priority are stored only if the new priority is equal to or higher than the stored priority.
- add_item(priority, item)
Adds new item to the container. New item is stored in the container value
- clone()
Makes copy (clone) of this object.
- from_string(value)
Parses input string and returns a container of items.
Items in the input string are separated by delimiters (default: space, comma, newline). Leading and trailing whitespace is trimmed from each item. Backslash ‘' can be used to escape any character, allowing it to be included literally in items.
Special case: If the string starts with a non-space delimiter, an empty item is inserted as the first element, which can be used to clear existing option content.
- Parameters:
value (string) – The input string to parse
- Return type:
libdnf5::OptionStringContainer< std::set< std::string >,false >::ValueType
- Returns:
Container with parsed items
- static get_default_delimiters()
Returns the default delimiters
- get_default_value()
Gets the default value. Default value is used until it is replaced by set() method.
- get_delimiters()
Return delimiters of this OptionStringList
- get_value()
Gets the stored value.
- get_value_string()
Gets a string representation of the stored value.
- set(*args)
Overload 1: Sets new value and priority (source). The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 2: Sets new value and runtime priority.
Overload 3: Parses input string and sets new value and priority. The value and priority are stored only if the new priority is equal to or higher than the stored priority.
Overload 4: Parses input string and sets new value and runtime priority.
- test(value)
Tests input value and throws exception if the value is not allowed.
- thisown
- to_string(value)
Converts input container of string items to a single string. Items are joined using the first delimiter character. Backslashes and delimiter characters within items are escaped with a backslash.
- libdnf5.conf.PERSISTDIR
- libdnf5.conf.PLUGINS_CONF_DIR
- libdnf5.conf.PLUGINS_CONF_DIRS
- libdnf5.conf.PLUGIN_API_VERSION
- libdnf5.conf.REPOSITORY_CONF_DIRS
- libdnf5.conf.REPOS_OVERRIDE_DIR
- libdnf5.conf.SYSTEM_CACHEDIR
- libdnf5.conf.SYSTEM_REPO_LOCK_FILENAME
- libdnf5.conf.SYSTEM_STATE_DIR
- class libdnf5.conf.SwigPyIterator(*args, **kwargs)
- advance(n)
- copy()
- decr(n=1)
- distance(x)
- equal(x)
- incr(n=1)
- next()
- previous()
- thisown
- value()
- libdnf5.conf.TRANSACTION_LOCK_FILEPATH
- libdnf5.conf.VARS_DIRS
- libdnf5.conf.VENDOR_CONF_DIR
- libdnf5.conf.VERSIONLOCK_CONF_FILENAME
- class libdnf5.conf.Vars(*args)
Class for reading and substituting DNF vars (arch, releasever, etc.).
The class loads the variables from the environment as well as from a list of directories.
- Priority_AUTO
- Priority_COMMANDLINE
- Priority_DEFAULT
- Priority_ENVIRONMENT
- Priority_PLUGIN
- Priority_RUNTIME
- Priority_VARSDIR
- contains(name)
Checks if there is an variable with name equivalent to name in the container.
- Parameters:
name (string) – Name of the variable
- Return type:
boolean
- Returns:
true if there is such an element, otherwise false
- static detect_release(base, install_root_path)
Detects the releasever of the system
Returns the release name of the distribution of the tree rooted at installroot. This function uses information from RPMDB found under the tree. It’s preferred to use
detect_releaseversoverdetect_release; if you use the latter, you will not be aware of distribution overrides for the major and minor release versions.- Return type:
std::unique_ptr< std::string >
- Returns:
the detected releasever, or nullptr if the releasever could not be determined (perhaps because the tree has no RPMDB).
- static detect_releasevers(base, install_root_path)
Detect the releasever, overridden major release, and overridden minor release for the system
Returns a tuple of the release name, overridden major release, and overridden minor release of the distribution of the tree rooted at installroot. This function uses information from RPMDB found under the tree. The major and minor release versions are usually derived from the release version by splitting it on the first
., but distributions can override the derived major and minor versions.- Return type:
std::tuple< std::unique_ptr< std::string >,std::unique_ptr< std::string >,std::unique_ptr< std::string > >
- Returns:
a tuple of the releasever, overridden releasever_major, and overridden releasever_minor. Each member of the tuple can be nullptr if not provided by the system.
- get(name)
Get particular variable.
- Parameters:
name (string) – Name of the variable
- get_value(name)
Get value of particular variable.
- Parameters:
name (string) – Name of the variable
- get_variables()
- is_read_only(name)
Checks whether a variable is read-only
- Parameters:
name (string) – Name of the variable
- Return type:
boolean
- Returns:
true if the variable is read-only, false if it is writable
- set(*args)
Set particular variable to a value
- Parameters:
name (string) – Name of the variable
value (string) – Value to be stored in variable
prio (int, optional) – Source/Priority of the value
- Raises:
ReadOnlyVariableError if the variable is read-only
- substitute(text)
Substitute DNF vars in the input text.
- Parameters:
text (string) – The text for substitution
- Return type:
string
- Returns:
The substituted text
- thisown
- unset(*args)
Unset particular variable
- Parameters:
name (string) – Name of the variable
prio (int, optional) – Source/Priority of the request
- Raises:
ReadOnlyVariableError if the variable is read-only
- Return type:
boolean
- Returns:
false if the variable exists after the function returns (insufficient request priority)
- libdnf5.conf.create_config_option_attributes(cls)
- libdnf5.conf.cvar
- libdnf5.conf.get_library_version()
- Return type:
- Returns:
Library version
Since: 5.0
- libdnf5.conf.get_plugin_api_version()
- Return type:
- Returns:
Plugin API version implemented in the library
Since: 5.0