Skip to content

Commit

Permalink
Hardcode protection of dnf5 package
Browse files Browse the repository at this point in the history
Doing it this way, rather than using a file in /etc/dnf/protected.d,
means that DNF 4 will still be able to remove DNF 5. I think this is the
ideal functionality: DNF 4 will be able to remove DNF 5 and vice-versa,
but neither package manager will accidentally remove itself.

Resolves https://bugzilla.redhat.com/show_bug.cgi?id=2221907.
  • Loading branch information
evan-goode authored and Conan-Kudo committed Sep 21, 2023
1 parent e54c233 commit 5b1a15c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libdnf5/conf/config_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ class ConfigMain::Impl {
OptionString proxy_username{nullptr};
OptionString proxy_password{nullptr};
OptionStringSet proxy_auth_method{"any", "any|none|basic|digest|negotiate|ntlm|digest_ie|ntlm_wb", false};
OptionStringList protected_packages{resolve_globs("dnf glob:/etc/dnf/protected.d/*.conf")};
OptionStringList protected_packages{resolve_globs("dnf5 glob:/etc/dnf/protected.d/*.conf")};
OptionString username{""};
OptionString password{""};
OptionBool gpgcheck{false};
Expand Down

0 comments on commit 5b1a15c

Please sign in to comment.