From 49e6e81830c34b7d881160a79169aa9425c81cd1 Mon Sep 17 00:00:00 2001 From: Liangsheng Yin Date: Wed, 2 Sep 2026 20:51:47 -0700 Subject: [PATCH] [CI] Accept t64-suffixed apt packages in the install skip check (#37689) --- scripts/ci/cuda/ci_install_dependency.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/scripts/ci/cuda/ci_install_dependency.sh b/scripts/ci/cuda/ci_install_dependency.sh index 993302191..067c64c0a 100755 --- a/scripts/ci/cuda/ci_install_dependency.sh +++ b/scripts/ci/cuda/ci_install_dependency.sh @@ -136,6 +136,18 @@ cleanup_stale_shm() { mark_step_done "${FUNCNAME[0]}" } +is_apt_package_installed() { + local name + # Ubuntu 24.04 renamed time64 libraries (librdmacm1 -> librdmacm1t64); + # apt-get follows the Provides alias, dpkg -l does not. + for name in "$1" "${1}t64"; do + if dpkg -l "$name" 2>/dev/null | grep -q "^ii"; then + return 0 + fi + done + return 1 +} + install_apt_packages() { CI_APT_PACKAGES=( python3 python3-pip python3-venv python3-dev git libnuma-dev libssl-dev pkg-config @@ -152,7 +164,7 @@ install_apt_packages() { local pkg local -a MISSING_APT_PACKAGES=() for pkg in "${CI_APT_PACKAGES[@]}"; do - dpkg -l "$pkg" 2>/dev/null | grep -q "^ii" || MISSING_APT_PACKAGES+=("$pkg") + is_apt_package_installed "$pkg" || MISSING_APT_PACKAGES+=("$pkg") done if [ ${#MISSING_APT_PACKAGES[@]} -eq 0 ]; then