|
@@ -1,9 +1,10 @@
|
|
#!/usr/bin/env python3
|
|
#!/usr/bin/env python3
|
|
|
|
|
|
-import json
|
|
|
|
|
|
+from os import getenv, environ
|
|
from pathlib import Path
|
|
from pathlib import Path
|
|
-from os import getenv
|
|
|
|
|
|
+from subprocess import run
|
|
from sys import argv
|
|
from sys import argv
|
|
|
|
+import json
|
|
|
|
|
|
if len(argv) != 2:
|
|
if len(argv) != 2:
|
|
print("JSON info files script requires ouput file as argument")
|
|
print("JSON info files script requires ouput file as argument")
|
|
@@ -31,6 +32,21 @@ for json_file in work_dir.glob("*.json"):
|
|
image_info["profiles"][device_id]["images"][0]
|
|
image_info["profiles"][device_id]["images"][0]
|
|
)
|
|
)
|
|
|
|
|
|
|
|
+
|
|
|
|
+output["default_packages"] = run(
|
|
|
|
+ [
|
|
|
|
+ "make",
|
|
|
|
+ "--no-print-directory",
|
|
|
|
+ "-C",
|
|
|
|
+ f"target/linux/{output['target'].split('/')[0]}",
|
|
|
|
+ "val.DEFAULT_PACKAGES",
|
|
|
|
+ ],
|
|
|
|
+ capture_output=True,
|
|
|
|
+ check=True,
|
|
|
|
+ env=environ.copy().update({"TOPDIR": Path().cwd()}),
|
|
|
|
+ text=True,
|
|
|
|
+).stdout.split()
|
|
|
|
+
|
|
if output:
|
|
if output:
|
|
output_path.write_text(json.dumps(output, sort_keys=True, separators=(",", ":")))
|
|
output_path.write_text(json.dumps(output, sort_keys=True, separators=(",", ":")))
|
|
else:
|
|
else:
|