Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions build_tools/packaging/linux/native_linux_packages_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,26 @@ def install_rpm_packages(self) -> bool:
"-y",
] + self.package_names
print("[INFO] Using zypper for SLES package installation")
# Install update-alternatives (required for SLES) before ROCm packages
print("\nInstalling update-alternatives (SLES prerequisite)...")
try:
result = subprocess.run(
["zypper", "install", "-y", "update-alternatives"],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be in yml workflow. Not in test script

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks will update this in #3126

stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
text=True,
timeout=120,
)
if result.returncode == 0:
print("[PASS] update-alternatives installed")
else:
print(
f"[WARN] zypper install update-alternatives returned {result.returncode} (continuing anyway)"
)
except (subprocess.TimeoutExpired, OSError) as e:
print(
f"[WARN] Could not install update-alternatives: {e} (continuing anyway)"
)
else:
cmd = ["dnf", "install", "-y"] + self.package_names
print(f"\nRunning: {' '.join(cmd)}")
Expand Down
Loading