aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Spooren <mail@aparcar.org>2020-06-30 16:00:25 -1000
committerDaniel Golle <daniel@makrotopia.org>2020-07-13 21:24:30 +0100
commit270711b8eddbc00dae88ad588927d8abce925b9f (patch)
treee704a7f5572d5c06e19dd859c677eaf2fe8b491f
parente3618eb2cc210763fe1b309fd7e337fdf8a98f0b (diff)
downloadupstream-270711b8eddbc00dae88ad588927d8abce925b9f.tar.gz
upstream-270711b8eddbc00dae88ad588927d8abce925b9f.tar.bz2
upstream-270711b8eddbc00dae88ad588927d8abce925b9f.zip
build,json: store arch_packages in profiles.json
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> (cherry picked from commit f09b9319c666e343763c7618878a503ad7eb7531)
-rwxr-xr-xscripts/json_overview_image_info.py7
1 files changed, 5 insertions, 2 deletions
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=(",", ":")))