diff mbox series

build,json: fix duplicates in default_packages

Message ID 20210321092627.481352-1-mail@aparcar.org
State Accepted
Delegated to: Paul Spooren
Headers show
Series build,json: fix duplicates in default_packages | expand

Commit Message

Paul Spooren March 21, 2021, 9:26 a.m. UTC
Calling without the DUMP=1 argument causes the target specific Makefile
to be "included" again which adds the target specific packages twice,
once on the actual run and once included from `include/target.mk`.

This led to duplicate package entries, causing confusion in downstream
projects using the generated JSON files.

While at it, apply `black` style to Python script.

Signed-off-by: Paul Spooren <mail@aparcar.org>
---
 scripts/json_overview_image_info.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/scripts/json_overview_image_info.py b/scripts/json_overview_image_info.py
index ca6fbbc962..23d8dcb857 100755
--- a/scripts/json_overview_image_info.py
+++ b/scripts/json_overview_image_info.py
@@ -38,9 +38,10 @@  if output:
             "make",
             "--no-print-directory",
             "-C",
-            "target/linux/{}".format(output['target'].split('/')[0]),
+            "target/linux/{}".format(output["target"].split("/")[0]),
             "val.DEFAULT_PACKAGES",
             "val.ARCH_PACKAGES",
+            "DUMP=1",
         ],
         stdout=PIPE,
         stderr=PIPE,