From 35967592a1fd55a0e32d09a0b21ee07e744ac67a Mon Sep 17 00:00:00 2001 From: Evan Goode Date: Thu, 7 Nov 2024 02:34:37 +0000 Subject: [PATCH] Add `persistence` config option --- libdnf/conf/ConfigMain.cpp | 2 ++ libdnf/conf/ConfigMain.hpp | 1 + 2 files changed, 3 insertions(+) diff --git a/libdnf/conf/ConfigMain.cpp b/libdnf/conf/ConfigMain.cpp index 3f12762ac..4360ee193 100644 --- a/libdnf/conf/ConfigMain.cpp +++ b/libdnf/conf/ConfigMain.cpp @@ -284,6 +284,7 @@ class ConfigMain::Impl { OptionString comment{nullptr}; OptionBool downloadonly{false}; // runtime only option OptionBool ignorearch{false}; + OptionEnum persistence{"persist", {"persist", "transient"}}; OptionString module_platform_id{nullptr}; OptionBool module_stream_switch{false}; OptionBool module_obsoletes{false}; @@ -613,6 +614,7 @@ OptionPath & ConfigMain::destdir() { return pImpl->destdir; } OptionString & ConfigMain::comment() { return pImpl->comment; } OptionBool & ConfigMain::downloadonly() { return pImpl->downloadonly; } OptionBool & ConfigMain::ignorearch() { return pImpl->ignorearch; } +OptionEnum & ConfigMain::persistence() { return pImpl->persistence; } OptionString & ConfigMain::module_platform_id() { return pImpl->module_platform_id; } OptionBool & ConfigMain::module_stream_switch() { return pImpl->module_stream_switch; } diff --git a/libdnf/conf/ConfigMain.hpp b/libdnf/conf/ConfigMain.hpp index c63c9a827..af6496f3f 100644 --- a/libdnf/conf/ConfigMain.hpp +++ b/libdnf/conf/ConfigMain.hpp @@ -125,6 +125,7 @@ class ConfigMain : public Config { OptionString & comment(); OptionBool & downloadonly(); OptionBool & ignorearch(); + OptionEnum & persistence(); OptionString & module_platform_id(); OptionBool & module_stream_switch();