build,json: fix duplicates in default_packages
authorPaul Spooren <mail@aparcar.org>
Sun, 21 Mar 2021 09:23:34 +0000 (23:23 -1000)
committerPaul Spooren <mail@aparcar.org>
Sun, 21 Mar 2021 09:58:52 +0000 (23:58 -1000)
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

index ca6fbbc962f12ac38a5c05a3d63c446153979c5a..23d8dcb85795ba8bf83978bab720c45fd55a7ec4 100755 (executable)
@@ -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,