summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorzsdc <taras@vyos.io>2024-05-14 19:32:14 +0300
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2024-05-15 05:03:24 +0000
commit5d15b0a7507f07aac9cc0d4e876cc5981f66441d (patch)
tree541aa0ae7ea3f2a50d44a1c15923bdb054c3d8c3 /scripts
parent3d2c16976e0b453772d96e16df42b5629942691c (diff)
downloadvyos-build-5d15b0a7507f07aac9cc0d4e876cc5981f66441d.tar.gz
vyos-build-5d15b0a7507f07aac9cc0d4e876cc5981f66441d.zip
build-script: T3664: Add flavor and architecture to image name (rework)
The previous version did not work for all flavor types. This one should be universal. (cherry picked from commit 31b720b8f100670f0e933dfbf9993a5315f5a904)
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/image-build/build-vyos-image4
-rw-r--r--scripts/image-build/raw_image.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/scripts/image-build/build-vyos-image b/scripts/image-build/build-vyos-image
index 5bf5803d..80339308 100755
--- a/scripts/image-build/build-vyos-image
+++ b/scripts/image-build/build-vyos-image
@@ -489,7 +489,7 @@ if __name__ == "__main__":
iter(os.remove, artifacts)
## Create the target ISO file path
- iso_file = "vyos-{0}-{1}.iso".format(version_data["version"], build_config["architecture"])
+ iso_file = f"vyos-{version_data['version']}-{build_config['build_flavor']}-{build_config['architecture']}.iso"
## Create live-build configuration files
@@ -645,6 +645,6 @@ Pin-Priority: 600
for f in other_formats:
image_ext = build_config.get("image_ext", f)
image_opts = build_config.get("image_opts", "")
- target = f"{os.path.splitext(raw_image)[0]}-{build_config['build_flavor']}.{image_ext}"
+ target = f"{os.path.splitext(raw_image)[0]}.{image_ext}"
print(f"I: Building {f} file {target}")
cmd(f"qemu-img convert -f raw -O {f} {image_opts} {raw_image} {target}")
diff --git a/scripts/image-build/raw_image.py b/scripts/image-build/raw_image.py
index 27fb27ab..5068ba1b 100644
--- a/scripts/image-build/raw_image.py
+++ b/scripts/image-build/raw_image.py
@@ -201,7 +201,7 @@ def create_raw_image(build_config, iso_file, work_dir):
con.build_config = build_config
version_data = read_version_data(con.iso_dir)
version = version_data['version']
- raw_file = f"vyos-{version}.raw"
+ raw_file = f"vyos-{version}-{build_config['build_flavor']}-{build_config['architecture']}.raw"
print(f"I: Building raw file {raw_file}")
create_disk(raw_file, build_config["disk_size"])
setup_loop_device(con, raw_file)