update photon paths to use their $releasever string string which includes .0

This commit is contained in:
Felippe Burk 2023-12-15 11:13:20 -07:00 committed by Daniel Wozniak
parent 3f74d428e1
commit 700efa6133
2 changed files with 6 additions and 0 deletions

View file

@ -256,6 +256,9 @@ def setup_redhat_family(
):
arch = os.environ.get("SALT_REPO_ARCH") or "x86_64"
if os_name == "photon":
os_version = f"{os_version}.0"
if repo_subpath == "minor":
repo_url_base = (
f"{root_url}/{os_name}/{os_version}/{arch}/{repo_subpath}/{salt_release}"

View file

@ -380,6 +380,9 @@ def rpm(
assert incoming is not None
assert repo_path is not None
assert key_id is not None
if distro == "photon":
distro_version = f"{distro_version}.0"
display_name = f"{distro.capitalize()} {distro_version}"
if distro_version not in _rpm_distro_info[distro]:
ctx.error(f"Support for {display_name} is missing.")