From 0f47ef5ade73cd971848e1a817ee49d5f041dc4c Mon Sep 17 00:00:00 2001 From: Petr Khartskhaev Date: Mon, 13 Jul 2026 16:01:26 +0200 Subject: [PATCH] Add matching .fXX suffixes to generator.py Main purpose is to enable easy distgenification of the base and core containers. Added a new statement to filename_to_distro_config() --- generator.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/generator.py b/generator.py index f9939a5a..e61ca593 100755 --- a/generator.py +++ b/generator.py @@ -74,6 +74,7 @@ def filename_to_distro_config( - Dockerfile.rhelXX → rhel-XX-x86_64.yaml - Dockerfile.cXXs → centos-stream-XX-x86_64.yaml - Dockerfile.fedora → the newest fedora-XX-x86_64.yaml + - Dockerfile.fXX → the selected fedora-XX-x86_64.yaml If not found, empty string is returned indicating that the combination of distro and version is not included @@ -81,6 +82,7 @@ def filename_to_distro_config( """ rhel_match = re.match(r".*\.rhel(\d+)$", filename) centos_stream_match = re.match(r".*\.c(\d+)s$", filename) + fedora_match = re.match(r".*\.f(\d+)$", filename) if rhel_match: config = f"rhel-{rhel_match.group(1)}-x86_64.yaml" @@ -96,9 +98,11 @@ def filename_to_distro_config( config = sorted_configs[0] else: config = "" + elif fedora_match: # just for base and core images + config = f"fedora-{fedora_match.group(1)}-x86_64.yaml" else: raise RuntimeError( - f"File {filename} does not match any of the known suffixes: .rhelXX, .cXs, or .fedora" + f"File {filename} does not match any of the known suffixes: .rhelXX, .cXs, .fedora, or .fXX" ) return config