From 08a362a5403366efef81098870eb1bc47d4747cb Mon Sep 17 00:00:00 2001 From: Alois Wohlschlager Date: Sat, 9 Nov 2024 12:08:24 +0100 Subject: [PATCH] libutil/config: fix appendable options not getting marked as overridden Commit 4dbbd721eb9db75d4968a624b8cb9e75e979a144 intended to mark all settings as overridden when they are. Unfortunately, due to an oversight, this marking was accidentally performed in the implementation details of non-appendable options. Move it to the common codepath so that it works for appendable options too. Fixes: https://git.lix.systems/lix-project/lix/issues/573 Change-Id: Idc3402bac48b19d832acd9b553e16e5791470c26 --- src/libutil/config-impl.hh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libutil/config-impl.hh b/src/libutil/config-impl.hh index 2342c9a03..6abc9733a 100644 --- a/src/libutil/config-impl.hh +++ b/src/libutil/config-impl.hh @@ -64,8 +64,6 @@ void BaseSetting::appendOrSet(T newValue, bool append, const ApplyConfigOptio !trait::appendable, "using default `appendOrSet` implementation with an appendable type"); assert(!append); - - overridden = true; value = std::move(newValue); } @@ -77,6 +75,7 @@ void BaseSetting::set(const std::string & str, bool append, const ApplyConfig if (deprecated && (append || parsed != value)) { warn("deprecated setting '%s' found (set to '%s')", name, str); } + overridden = true; appendOrSet(std::move(parsed), append, options); } else { assert(experimentalFeature);