From 6581e2486d71215ef01b4c7005e70346484cc0f3 Mon Sep 17 00:00:00 2001 From: Andrea Righi Date: Mon, 30 Oct 2023 14:08:49 +0100 Subject: [PATCH] annotations: update: properly update note for arch-flavour configs Values in the form "arch-flavour" are incorrectly processed in the logic to determine if the note needs to be updated, causing a bunch of notes to be incorrectly replaced with 'TODO: update not'. Fix this by searching the values with the proper arch and flavour. Signed-off-by: Andrea Righi --- kconfig/annotations.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kconfig/annotations.py b/kconfig/annotations.py index 145523c..5cd51ae 100644 --- a/kconfig/annotations.py +++ b/kconfig/annotations.py @@ -227,6 +227,7 @@ class Annotation(Config): } # Import configs from the Kconfig object into Annotations + flavour_arg = flavour if flavour is not None: flavour = arch + f"-{flavour}" else: @@ -240,7 +241,7 @@ class Annotation(Config): if "policy" in self.config[conf]: # Add a TODO if a config with a note is changing and print # a warning - old_val = self.search_config(config=conf, arch=arch, flavour=flavour) + old_val = self.search_config(config=conf, arch=arch, flavour=flavour_arg) if old_val: old_val = old_val[conf] if val != old_val and "note" in self.config[conf]: -- 2.31.1