Skip to content

Commit 1653876

Browse files
committed
Update Review Comment - Add azl3 os_profile support
1 parent a1dcda7 commit 1653876

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

build_tools/packaging/linux/native_linux_packages_test.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,22 @@ def _derive_package_type(os_profile: str) -> str:
2929
"""Derive package type from OS profile.
3030
3131
Args:
32-
os_profile: OS profile (e.g., ubuntu2404, rhel8, debian12, sles16)
32+
os_profile: OS profile (e.g., ubuntu2404, rhel8, debian12, sles16, azl3)
3333
3434
Returns:
3535
Package type ('deb' or 'rpm')
3636
"""
3737
os_profile_lower = os_profile.lower()
3838
if os_profile_lower.startswith(("ubuntu", "debian")):
3939
return "deb"
40-
elif os_profile_lower.startswith(("rhel", "sles", "almalinux", "centos")):
40+
elif os_profile_lower.startswith(
41+
("rhel", "sles", "almalinux", "centos", "azl")
42+
):
4143
return "rpm"
4244
else:
4345
raise ValueError(
4446
f"Unable to derive package type from OS profile: {os_profile}. "
45-
"Supported profiles: ubuntu*, debian*, rhel*, sles*, almalinux*, centos*"
47+
"Supported profiles: ubuntu*, debian*, rhel*, sles*, almalinux*, centos*, azl*"
4648
)
4749

4850
def _is_sles(self) -> bool:
@@ -66,7 +68,7 @@ def __init__(
6668
6769
Args:
6870
repo_url: Full repository URL (constructed in YAML)
69-
os_profile: OS profile (e.g., ubuntu2404, rhel8, debian12, sles16)
71+
os_profile: OS profile (e.g., ubuntu2404, rhel8, debian12, sles16, azl3)
7072
release_type: Type of release ('nightly' or 'prerelease')
7173
install_prefix: Installation prefix (default: /opt/rocm/core)
7274
gfx_arch: GPU architecture (default: gfx94x)
@@ -926,7 +928,7 @@ def main():
926928
"--os-profile",
927929
type=str,
928930
required=True,
929-
help="OS profile (e.g., ubuntu2404, rhel8, debian12, sles16). Package type is derived from this.",
931+
help="OS profile (e.g., ubuntu2404, rhel8, debian12, sles16, azl3). Package type is derived from this.",
930932
)
931933

932934
parser.add_argument(

0 commit comments

Comments
 (0)