diff mbox series

build,json: store arch_packages in profiles.json

Message ID 20200701020024.2939863-1-mail@aparcar.org
State Accepted
Delegated to: Daniel Golle
Headers show
Series build,json: store arch_packages in profiles.json | expand

Commit Message

Paul Spooren July 1, 2020, 2 a.m. UTC
The `arch_packages` contains the supported package architecture.

Previously it was necessary to parse the `Packages` index for the line
`Architecture:`, requiring both an additional parser and file download.

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

Patch

diff --git a/scripts/json_overview_image_info.py b/scripts/json_overview_image_info.py
index 59d69df314..20b14f236b 100755
--- a/scripts/json_overview_image_info.py
+++ b/scripts/json_overview_image_info.py
@@ -33,19 +33,22 @@  for json_file in work_dir.glob("*.json"):
             )
 
 
-output["default_packages"] = run(
+default_packages, output["arch_packages"] = run(
     [
         "make",
         "--no-print-directory",
         "-C",
         f"target/linux/{output['target'].split('/')[0]}",
         "val.DEFAULT_PACKAGES",
+        "val.ARCH_PACKAGES",
     ],
     capture_output=True,
     check=True,
     env=environ.copy().update({"TOPDIR": Path().cwd()}),
     text=True,
-).stdout.split()
+).stdout.splitlines()
+
+output["default_packages"] = default_packages.split()
 
 if output:
     output_path.write_text(json.dumps(output, sort_keys=True, separators=(",", ":")))