From: Andrea Righi Date: Mon, 30 Oct 2023 13:08:49 +0000 (+0100) Subject: annotations: update: properly update note for arch-flavour configs X-Git-Tag: v0.2~18 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=6581e2486d71215ef01b4c7005e70346484cc0f3;p=annotations.git 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 --- 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]: