Skip to content

Commit

Permalink
Add new config option exclude_from_weak
Browse files Browse the repository at this point in the history
  • Loading branch information
j-mracek authored and pkratoch committed Sep 30, 2021
1 parent e5ecbc1 commit f15e973
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions libdnf/conf/ConfigMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ class ConfigMain::Impl {
OptionBool fastestmirror{false};
OptionStringList excludepkgs{std::vector<std::string>{}};
OptionStringList includepkgs{std::vector<std::string>{}};
OptionStringList exclude_from_weak{std::vector<std::string>{}};
OptionString proxy{""};
OptionString proxy_username{nullptr};
OptionString proxy_password{nullptr};
Expand Down Expand Up @@ -475,6 +476,11 @@ ConfigMain::Impl::Impl(Config & owner)
optionTListAppend(includepkgs, priority, value);
}, nullptr, true
);
owner.optBinds().add("exclude_from_weak", exclude_from_weak,
[&](Option::Priority priority, const std::string & value){
optionTListAppend(exclude_from_weak, priority, value);
}, nullptr, true
);

owner.optBinds().add("proxy", proxy);
owner.optBinds().add("proxy_username", proxy_username);
Expand Down Expand Up @@ -601,6 +607,7 @@ OptionString & ConfigMain::cachedir() { return pImpl->cachedir; }
OptionBool & ConfigMain::fastestmirror() { return pImpl->fastestmirror; }
OptionStringList & ConfigMain::excludepkgs() { return pImpl->excludepkgs; }
OptionStringList & ConfigMain::includepkgs() { return pImpl->includepkgs; }
OptionStringList & ConfigMain::exclude_from_weak() { return pImpl->exclude_from_weak; }
OptionString & ConfigMain::proxy() { return pImpl->proxy; }
OptionString & ConfigMain::proxy_username() { return pImpl->proxy_username; }
OptionString & ConfigMain::proxy_password() { return pImpl->proxy_password; }
Expand Down
1 change: 1 addition & 0 deletions libdnf/conf/ConfigMain.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ class ConfigMain : public Config {
OptionBool & fastestmirror();
OptionStringList & excludepkgs();
OptionStringList & includepkgs();
OptionStringList & exclude_from_weak();
OptionString & proxy();
OptionString & proxy_username();
OptionString & proxy_password();
Expand Down

0 comments on commit f15e973

Please sign in to comment.