From: Eric Fahlgren Date: Sun, 8 Mar 2026 20:45:42 +0000 (-0700) Subject: build: segregate build artifacts by host architecture X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F22331%2Fhead;p=thirdparty%2Fopenwrt.git build: segregate build artifacts by host architecture Add structured data to each of the build artifacts listed in profiles.json, in order to accomodate future inclusion of different build host architectures. Link: https://github.com/openwrt/openwrt/pull/22264#issuecomment-4014914414 Signed-off-by: Eric Fahlgren Link: https://github.com/openwrt/openwrt/pull/22331 Signed-off-by: Robert Marko --- diff --git a/scripts/json_overview_image_info.py b/scripts/json_overview_image_info.py index fe476e10fa7..c8d0e0ad452 100755 --- a/scripts/json_overview_image_info.py +++ b/scripts/json_overview_image_info.py @@ -5,6 +5,7 @@ from pathlib import Path from subprocess import run, PIPE from sys import argv import json +import re if len(argv) != 2: print("JSON info files script requires output file as argument") @@ -31,8 +32,12 @@ def get_initial_output(image_info): def add_artifact(artifact, prefix="openwrt-"): files = list(output_dir.glob(f"{prefix}{artifact}-*")) - if len(files) == 1: - output[artifact] = str(files[0].name) + if len(files): + output[artifact] = {} + for file in files: + file = str(file.name) + arch = re.match(r".*Linux-([^.]*)\.", file).group(1) + output[artifact][arch] = file for json_file in work_dir.glob("*.json"):