Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions libdnf/conf/ConfigMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,8 @@ class ConfigMain::Impl {
OptionBool countme{false};
OptionBool protect_running_kernel{true};

OptionStringList usr_drift_protected_paths{resolveGlobs("glob:/etc/dnf/usr-drift-protected-paths.d/*.conf")};

// Repo main config

OptionNumber<std::uint32_t> retries{10};
Expand Down Expand Up @@ -460,6 +462,12 @@ ConfigMain::Impl::Impl(Config & owner)
owner.optBinds().add("countme", countme);
owner.optBinds().add("protect_running_kernel", protect_running_kernel);
owner.optBinds().add("persistence", persistence);
owner.optBinds().add("usr_drift_protected_paths", usr_drift_protected_paths,
[&](Option::Priority priority, const std::string & value){
if (priority >= usr_drift_protected_paths.getPriority())
usr_drift_protected_paths.set(priority, resolveGlobs(value));
}, nullptr, false
);

// Repo main config

Expand Down Expand Up @@ -616,6 +624,7 @@ OptionString & ConfigMain::comment() { return pImpl->comment; }
OptionBool & ConfigMain::downloadonly() { return pImpl->downloadonly; }
OptionBool & ConfigMain::ignorearch() { return pImpl->ignorearch; }
OptionEnum<std::string> & ConfigMain::persistence() { return pImpl->persistence; }
OptionStringList & ConfigMain::usr_drift_protected_paths() { return pImpl->usr_drift_protected_paths; }

OptionString & ConfigMain::module_platform_id() { return pImpl->module_platform_id; }
OptionBool & ConfigMain::module_stream_switch() { return pImpl->module_stream_switch; }
Expand Down
1 change: 1 addition & 0 deletions libdnf/conf/ConfigMain.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ class ConfigMain : public Config {
OptionBool & downloadonly();
OptionBool & ignorearch();
OptionEnum<std::string> & persistence();
OptionStringList & usr_drift_protected_paths();

OptionString & module_platform_id();
OptionBool & module_stream_switch();
Expand Down
Loading