Goal structures and enums

struct ResolveSpecSettings

Configure SPEC resolving. Important for queries that resolve SPEC.

Subclassed by libdnf5::GoalJobSettings

Public Functions

ResolveSpecSettings()
~ResolveSpecSettings()
ResolveSpecSettings(const ResolveSpecSettings &src)
ResolveSpecSettings &operator=(const ResolveSpecSettings &src)
ResolveSpecSettings(ResolveSpecSettings &&src) noexcept
ResolveSpecSettings &operator=(ResolveSpecSettings &&src) noexcept
void set_ignore_case(bool ignore_case)

Set whether to match case-insensitively

Default: false

bool get_ignore_case() const
void set_with_nevra(bool with_nevra)

Set whether packages’ nevras should be considered during SPEC matching

Default: true

bool get_with_nevra() const
void set_with_provides(bool with_provides)

Set whether packages’ provides should be considered during SPEC matching

Default: true

bool get_with_provides() const
void set_with_filenames(bool with_filenames)

Set whether package’s files should be considered during SPEC matching It will check if SPEC starts with “/” or “*‍/” and if it matches any file in a package

Default: true

bool get_with_filenames() const
void set_with_binaries(bool with_binaries)

Set whether package’s binaries should be considered during SPEC matching It will check whether SPEC is a binary -> /usr/(s)bin/<SPEC>

Default: true

bool get_with_binaries() const
void set_expand_globs(bool expand_globs)

Set whether to expand globs in package specs using fnmatch

Default: true

bool get_expand_globs() const
void set_nevra_forms(std::vector<libdnf5::rpm::Nevra::Form> nevra_forms)

When matching packages’ nevras is enabled specify allowed nevra forms.

The default can be obtained from libdnf5::rpm::Nevra::get_default_pkg_spec_forms().

std::vector<libdnf5::rpm::Nevra::Form> get_nevra_forms() const
void set_group_with_id(bool group_with_id)

Set whether groups’ ids should be considered during group SPEC matching

Default: true

bool get_group_with_id() const
void set_group_with_name(bool group_with_name)

Set whether groups’ names should be considered during group SPEC matching

Default: false

bool get_group_with_name() const
void set_group_search_groups(bool search_groups)

Configure whether to search in groups when matching SPEC in group ids or names. Historically group SPEC could also mean an environment. These flags configure in which entities the spec is searched for.

Default: true

bool get_group_search_groups() const
void set_group_search_environments(bool search_environments)

Configure whether to search in environments when matching SPEC in group ids or names.

Default: true

bool get_group_search_environments() const
struct GoalJobSettings : public libdnf5::ResolveSpecSettings

Public Functions

GoalJobSettings()
~GoalJobSettings()
GoalJobSettings(const GoalJobSettings &src)
GoalJobSettings(GoalJobSettings &&src) noexcept
GoalJobSettings &operator=(const GoalJobSettings &src)
GoalJobSettings &operator=(GoalJobSettings &&src) noexcept
GoalUsedSetting get_used_skip_broken() const

Return used value for skip_broken.

GoalUsedSetting get_used_skip_unavailable() const

Return used value for skip_unavailable.

GoalUsedSetting get_used_best() const

Return used value for best.

GoalUsedSetting get_used_clean_requirements_on_remove() const

Return used value for clean_requirements_on_remove.

void set_advisory_filter(const libdnf5::advisory::AdvisoryQuery &filter)

Optionally set AdvisoryQuery that is used to filter packages (used for upgrade). Upgrades considers only packages that resolve some advisory in specified AdvisoryQuery.

By default is is empty and no packages are filtered.

const libdnf5::advisory::AdvisoryQuery *get_advisory_filter() const
void set_group_package_types(libdnf5::comps::PackageType type)

Which types of group packages are going to be installed with the group.

Default is taken from ConfigMain.group_package_types

const libdnf5::comps::PackageType *get_group_package_types() const
void set_group_no_packages(bool group_no_packages)

If set to true, group operations (install / remove / upgrade) will only work with the group itself, but will not add to the transaction any packages.

Default: false

bool get_group_no_packages() const
void set_environment_no_groups(bool environment_no_groups)

If set to true, environments operations (install / remove / upgrade) will only work with the environment itself, but will not add to any groups to the transaction.

Default: false

bool get_environment_no_groups() const
void set_report_hint(bool report_hint)

Set whether to report packages providing alternatives (alternative-for(..) provide) and packages with different letter capitalization when no matches are found.

Default: true

bool get_report_hint() const
void set_skip_broken(GoalSetting skip_broken)

Resolve any dependency problems by removing packages that are causing problems from the transaction.

By default the value is taken from skip_broken configuration option.

GoalSetting get_skip_broken() const
void set_skip_unavailable(GoalSetting skip_unavailable)

Allow skipping packages that are unavailable.

By default the value is taken from a configuration option skip_unavailable except for remove action which defaults to true.

GoalSetting get_skip_unavailable() const
void set_best(GoalSetting best)

Try the best available package versions in transactions.

By default the value is taken from best configuration option.

GoalSetting get_best() const
void set_clean_requirements_on_remove(GoalSetting clean_requirements_on_remove)

Remove dependencies that are no longer used during dnf remove.

By default the value is false except for remove action which defaults to value from clean_requirements_on_remove configuration option.

GoalSetting get_clean_requirements_on_remove() const
void set_from_repo_ids(std::vector<std::string> from_repo_ids)

Not implemented yet.

std::vector<std::string> get_from_repo_ids() const
void set_to_repo_ids(std::vector<std::string> to_repo_ids)

Limit available packages to specified repositories.

Empty by default.

std::vector<std::string> get_to_repo_ids() const
enum class libdnf5::ProblemRules

Define a type of a broken solver rule.

Values:

enumerator RULE_DISTUPGRADE
enumerator RULE_INFARCH
enumerator RULE_UPDATE
enumerator RULE_JOB
enumerator RULE_JOB_UNSUPPORTED
enumerator RULE_JOB_NOTHING_PROVIDES_DEP
enumerator RULE_JOB_UNKNOWN_PACKAGE
enumerator RULE_JOB_PROVIDED_BY_SYSTEM
enumerator RULE_PKG
enumerator RULE_BEST_1
enumerator RULE_BEST_2
enumerator RULE_PKG_NOT_INSTALLABLE_1
enumerator RULE_PKG_NOT_INSTALLABLE_2
enumerator RULE_PKG_NOT_INSTALLABLE_3
enumerator RULE_PKG_NOT_INSTALLABLE_4
enumerator RULE_PKG_NOTHING_PROVIDES_DEP
enumerator RULE_PKG_SAME_NAME
enumerator RULE_PKG_CONFLICTS
enumerator RULE_PKG_OBSOLETES
enumerator RULE_PKG_INSTALLED_OBSOLETES
enumerator RULE_PKG_IMPLICIT_OBSOLETES
enumerator RULE_PKG_REQUIRES
enumerator RULE_PKG_SELF_CONFLICT
enumerator RULE_YUMOBS
enumerator RULE_UNKNOWN
enumerator RULE_PKG_REMOVAL_OF_PROTECTED
enumerator RULE_PKG_REMOVAL_OF_RUNNING_KERNEL
enumerator RULE_MODULE_DISTUPGRADE
enumerator RULE_MODULE_INFARCH
enumerator RULE_MODULE_UPDATE
enumerator RULE_MODULE_JOB
enumerator RULE_MODULE_JOB_UNSUPPORTED
enumerator RULE_MODULE_JOB_NOTHING_PROVIDES_DEP
enumerator RULE_MODULE_JOB_UNKNOWN_PACKAGE
enumerator RULE_MODULE_JOB_PROVIDED_BY_SYSTEM
enumerator RULE_MODULE_PKG
enumerator RULE_MODULE_BEST_1
enumerator RULE_MODULE_BEST_2
enumerator RULE_MODULE_PKG_NOT_INSTALLABLE_1
enumerator RULE_MODULE_PKG_NOT_INSTALLABLE_2
enumerator RULE_MODULE_PKG_NOT_INSTALLABLE_3
enumerator RULE_MODULE_PKG_NOT_INSTALLABLE_4
enumerator RULE_MODULE_PKG_NOTHING_PROVIDES_DEP
enumerator RULE_MODULE_PKG_SAME_NAME
enumerator RULE_MODULE_PKG_CONFLICTS
enumerator RULE_MODULE_PKG_OBSOLETES
enumerator RULE_MODULE_PKG_INSTALLED_OBSOLETES
enumerator RULE_MODULE_PKG_IMPLICIT_OBSOLETES
enumerator RULE_MODULE_PKG_REQUIRES
enumerator RULE_MODULE_PKG_SELF_CONFLICT
enumerator RULE_MODULE_YUMOBS
enumerator RULE_MODULE_UNKNOWN
enum class libdnf5::GoalProblem : uint32_t

Define a type of information, hint, or problem gathered during libdnf5::Goal::resolve()

Values:

enumerator NO_PROBLEM
enumerator SOLVER_ERROR
enumerator NOT_FOUND
enumerator EXCLUDED
enumerator ONLY_SRC
enumerator NOT_FOUND_IN_REPOSITORIES
enumerator NOT_INSTALLED
enumerator NOT_INSTALLED_FOR_ARCHITECTURE
enumerator HINT_ICASE
enumerator HINT_ALTERNATIVES
enumerator INSTALLED_LOWEST_VERSION
enumerator INSTALLED_IN_DIFFERENT_VERSION
enumerator NOT_AVAILABLE
enumerator ALREADY_INSTALLED
enumerator SOLVER_PROBLEM_STRICT_RESOLVEMENT
enumerator WRITE_DEBUG
enumerator UNSUPPORTED_ACTION
enumerator MULTIPLE_STREAMS
enumerator EXCLUDED_VERSIONLOCK
enumerator MODULE_SOLVER_ERROR_DEFAULTS

Error in module defaults detected during resolvement of module dependencies.

enumerator MODULE_SOLVER_ERROR_LATEST

Problem with latest modules during resolvement of module dependencies.

enumerator MODULE_SOLVER_ERROR

Error detected during resolvement of module dependencies.

enumerator MODULE_CANNOT_SWITH_STREAMS
enum class libdnf5::GoalAction

Types of Goal actions.

Values:

enumerator INSTALL
enumerator INSTALL_OR_REINSTALL
enumerator INSTALL_VIA_PROVIDE
enumerator INSTALL_BY_COMPS
enumerator REINSTALL
enumerator UPGRADE
enumerator UPGRADE_MINIMAL
enumerator UPGRADE_ALL
enumerator UPGRADE_ALL_MINIMAL
enumerator DISTRO_SYNC
enumerator DISTRO_SYNC_ALL
enumerator DOWNGRADE
enumerator REMOVE
enumerator RESOLVE
enumerator REASON_CHANGE
enumerator ENABLE
enumerator DISABLE
enumerator RESET
enum class libdnf5::GoalSetting

Settings for GoalJobSettings.

Values:

enumerator AUTO
enumerator SET_TRUE
enumerator SET_FALSE
enum class libdnf5::GoalUsedSetting

Unresolved or resolved values based on GoalSetting.

Values:

enumerator UNUSED
enumerator USED_TRUE
enumerator USED_FALSE