build,json: backport default_packages fixes
authorPaul Spooren <mail@aparcar.org>
Fri, 26 Mar 2021 08:53:28 +0000 (22:53 -1000)
committerPaul Spooren <mail@aparcar.org>
Fri, 26 Mar 2021 09:15:42 +0000 (23:15 -1000)
Remove duplicate packages by running in `target/linux/` rather than
`target/linux/<target>/<subtarget>` and sort packages alphabetically.

Squash commit of:
7880a64848 build,json: 3rd fixup of default_packages
b36068d35d build,json: fixup fixup of arch_packages
1bf2b3fe90 build,json: fixup missing arch_packages

Signed-off-by: Paul Spooren <mail@aparcar.org>
scripts/json_overview_image_info.py

index 23d8dcb85795ba8bf83978bab720c45fd55a7ec4..8dbd24af2d22a3ace24ed44e63ef0d6a72f28b54 100755 (executable)
@@ -38,10 +38,9 @@ if output:
             "make",
             "--no-print-directory",
             "-C",
-            "target/linux/{}".format(output["target"].split("/")[0]),
+            "target/linux/",
             "val.DEFAULT_PACKAGES",
             "val.ARCH_PACKAGES",
-            "DUMP=1",
         ],
         stdout=PIPE,
         stderr=PIPE,
@@ -50,7 +49,8 @@ if output:
         universal_newlines=True,
     ).stdout.splitlines()
 
-    output["default_packages"] = default_packages.split()
+    output["default_packages"] = sorted(default_packages.split())
+
     output_path.write_text(json.dumps(output, sort_keys=True, separators=(",", ":")))
 else:
     print("JSON info file script could not find any JSON files for target")