annotations: properly update configs with included JSON files
authorAndrea Righi <andrea.righi@canonical.com>
Mon, 11 Dec 2023 09:25:34 +0000 (10:25 +0100)
committerAndrea Righi <andrea.righi@canonical.com>
Mon, 11 Dec 2023 10:23:38 +0000 (11:23 +0100)
Fixes: 6d56aaf ("annotations: support JSON format")
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
kconfig/annotations.py

index 44c6f66da0674b4d500bd2772c34a4031388292c..cf028029209d9b14113c5ba6d15ec32a10f5ff7b 100644 (file)
@@ -203,7 +203,7 @@ class Annotation(Config):
             # We are procesing an imported annotations, so merge all the
             # configs and attributes.
             try:
-                self.config |= data["config"]
+                self.config = data["config"] | self.config
             except TypeError:
                 self.config = {**self.config, **data["config"]}
             self.arch = list(set(self.arch) | set(data["attributes"]["arch"]))