From: Andrea Righi Date: Mon, 5 Dec 2022 06:28:49 +0000 (+0100) Subject: annotations: properly merge configs with includes X-Git-Tag: v0.1~54 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=7f36ebd8fd301536775df1ebdce5caecb8ef757b;p=annotations.git annotations: properly merge configs with includes Signed-off-by: Andrea Righi --- diff --git a/kconfig/annotations.py b/kconfig/annotations.py index 7645fd1..0225e9d 100644 --- a/kconfig/annotations.py +++ b/kconfig/annotations.py @@ -103,10 +103,10 @@ class Annotation(Config): if conf in config: entry = config[conf] else: - entry = {} + entry = {'policy': {}} m = re.match(r'.*policy<(.*)>', line) if m: - entry['policy'] = literal_eval(m.group(1)) + entry['policy'] |= literal_eval(m.group(1)) m = re.match(r'.*note<(.*?)>', line) if m: entry['note'] = "'" + m.group(1).replace("'", '') + "'"