Skip to content

Commit

Permalink
config: Add optional_metadata_types option
Browse files Browse the repository at this point in the history
A new optional_metadata_types option was created to be used for configuring if filelists metadata should be downloaded by default.
  • Loading branch information
jan-kolarik committed Nov 7, 2023
1 parent 4a2c2a9 commit ba5bc3e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libdnf/conf/ConfigMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ class ConfigMain::Impl {
OptionBool debug_solver{false};
OptionStringList installonlypkgs{INSTALLONLYPKGS};
OptionStringList group_package_types{GROUP_PACKAGE_TYPES};
// TODO(jkolarik): Change to empty list when the system-wide change proposal is accepted
OptionStringList optional_metadata_types{std::vector<std::string>{"filelists"}};

OptionNumber<std::uint32_t> installonly_limit{3, 0,
[](const std::string & value)->std::uint32_t{
Expand Down Expand Up @@ -399,6 +401,7 @@ ConfigMain::Impl::Impl(Config & owner)
);

owner.optBinds().add("group_package_types", group_package_types);
owner.optBinds().add("optional_metadata_types", optional_metadata_types);
owner.optBinds().add("installonly_limit", installonly_limit);

owner.optBinds().add("tsflags", tsflags,
Expand Down Expand Up @@ -564,6 +567,7 @@ OptionStringList & ConfigMain::reposdir() { return pImpl->reposdir; }
OptionBool & ConfigMain::debug_solver() { return pImpl->debug_solver; }
OptionStringList & ConfigMain::installonlypkgs() { return pImpl->installonlypkgs; }
OptionStringList & ConfigMain::group_package_types() { return pImpl->group_package_types; }
OptionStringList & ConfigMain::optional_metadata_types() { return pImpl->optional_metadata_types; }
OptionNumber<std::uint32_t> & ConfigMain::installonly_limit() { return pImpl->installonly_limit; }
OptionStringList & ConfigMain::tsflags() { return pImpl->tsflags; }
OptionBool & ConfigMain::assumeyes() { return pImpl->assumeyes; }
Expand Down
1 change: 1 addition & 0 deletions libdnf/conf/ConfigMain.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ class ConfigMain : public Config {
OptionBool & debug_solver();
OptionStringList & installonlypkgs();
OptionStringList & group_package_types();
OptionStringList & optional_metadata_types();

/* NOTE: If you set this to 2, then because it keeps the current
kernel it means if you ever install an "old" kernel it'll get rid
Expand Down

0 comments on commit ba5bc3e

Please sign in to comment.