aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Spooren <mail@aparcar.org>2021-03-24 11:01:46 -1000
committerPaul Spooren <mail@aparcar.org>2021-03-24 13:41:34 -1000
commit1bf2b3fe90347641c87ca754913a4857a387478c (patch)
tree171fc36cab5b980307a46f9df2e138374668536b
parentb6c366efa89dcaa96072b0a12a451f873aa90077 (diff)
downloadupstream-1bf2b3fe90347641c87ca754913a4857a387478c.tar.gz
upstream-1bf2b3fe90347641c87ca754913a4857a387478c.tar.bz2
upstream-1bf2b3fe90347641c87ca754913a4857a387478c.zip
build,json: fixup missing arch_packages
Fix 7f4c2b1 "build,json: fix duplicates in default_packages" which removed duplicate default packages but also removed the package architecture from the profiles.json. If DUMP=1 is set, the `ARCH_PACKAGES` is no longer exported and therefore empty. Fix this by running make twice, once with DUMP=1 and once without. Signed-off-by: Paul Spooren <mail@aparcar.org>
-rwxr-xr-xscripts/json_overview_image_info.py19
1 files changed, 15 insertions, 4 deletions
diff --git a/scripts/json_overview_image_info.py b/scripts/json_overview_image_info.py
index 23d8dcb857..e0e1ff08d5 100755
--- a/scripts/json_overview_image_info.py
+++ b/scripts/json_overview_image_info.py
@@ -33,14 +33,13 @@ for json_file in work_dir.glob("*.json"):
)
if output:
- default_packages, output["arch_packages"] = run(
+ output["default_packages"] = run(
[
"make",
"--no-print-directory",
"-C",
"target/linux/{}".format(output["target"].split("/")[0]),
"val.DEFAULT_PACKAGES",
- "val.ARCH_PACKAGES",
"DUMP=1",
],
stdout=PIPE,
@@ -48,9 +47,21 @@ if output:
check=True,
env=environ.copy().update({"TOPDIR": Path().cwd()}),
universal_newlines=True,
- ).stdout.splitlines()
+ ).stdout.split()
+
+ output["arch_packages"] = run(
+ [
+ "make",
+ "--no-print-directory",
+ "val.ARCH_PACKAGES",
+ ],
+ stdout=PIPE,
+ stderr=PIPE,
+ check=True,
+ env=environ.copy().update({"TOPDIR": Path().cwd()}),
+ universal_newlines=True,
+ ).stdout.strip()
- output["default_packages"] = 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")