Merge pull request #895 from vyos/T7109-binary-includes

build: T7109: add support for includes_binary in flavors
This commit is contained in:
Daniil Baturin 2025-02-03 19:29:18 +00:00 committed by GitHub
commit c62327d3d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -590,6 +590,15 @@ DOCUMENTATION_URL="{build_config['documentation_url']}"
with open(file_path, 'w') as f:
f.write(i["data"])
if has_nonempty_key(build_config, "includes_binary"):
for i in build_config["includes_binary"]:
file_path = os.path.join(binary_includes_dir, i["path"])
if debug:
print(f"D: Creating binary image include file: {file_path}")
os.makedirs(os.path.dirname(file_path), exist_ok=True)
with open(file_path, 'w') as f:
f.write(i["data"])
## Create the default config
## Technically it's just another includes.chroot entry,
## but it's special enough to warrant making it easier for flavor writers