From 40671be7c9148cf6a77ae80016e85d3a4a4d5521 Mon Sep 17 00:00:00 2001 From: "Arif, Maisam" Date: Sun, 18 May 2025 10:32:31 -0500 Subject: [PATCH] Revert "Correct the dependencies of rocm_smi package." This reverts commit 6d53d9f9cff13ea0b6d42131e186fef0d5142f8a. --- CMakeLists.txt | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e5747566df..c7922a7a86 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -199,17 +199,20 @@ set(CPACK_DEB_COMPONENT_INSTALL ON) set(CPACK_RPM_COMPONENT_INSTALL ON) # Add dependencies -set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6, python3, libdrm-amdgpu-dev | libdrm-dev") +# no rocm-core +# python doesn't need to be asan +set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6, python3") set(CPACK_DEBIAN_ASAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}") -set(CPACK_RPM_PACKAGE_REQUIRES "python3, libdrm-amdgpu-dev | libdrm-dev") -set(CPACK_RPM_ASAN_PACKAGE_REQUIRES "${CPACK_RPM_PACKAGE_REQUIRES}") # Only add dependency on rocm-core if -DROCM_DEP_ROCMCORE=ON is given if(ROCM_DEP_ROCMCORE) - string(APPEND CPACK_DEBIAN_PACKAGE_DEPENDS ", rocm-core") - string(APPEND CPACK_DEBIAN_ASAN_PACKAGE_DEPENDS ", rocm-core-asan") - string(APPEND CPACK_RPM_PACKAGE_REQUIRES ", rocm-core") - string(APPEND CPACK_RPM_ASAN_PACKAGE_REQUIRES ", rocm-core-asan") + set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, rocm-core") + # rocm-core needs to be asan + # override original variable because CPACK_DEBIAN_PACKAGE_DEPENDS changed + set(CPACK_DEBIAN_ASAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}-asan") endif() +# carefully reuse DEB's "DEPENDS" for RPM's "REQUIRES" +set(CPACK_RPM_PACKAGE_REQUIRES "python3") +set(CPACK_RPM_ASAN_PACKAGE_REQUIRES "${CPACK_RPM_PACKAGE_REQUIRES}") #Component Specific Configuration/Flags set(CPACK_DEBIAN_DEV_PACKAGE_NAME ${ROCM_SMI_PACKAGE}) @@ -314,8 +317,8 @@ if(DEFINED ENV{CPACK_DEBIAN_PACKAGE_RELEASE}) else() set(CPACK_DEBIAN_PACKAGE_RELEASE "local") endif() -set(CPACK_DEBIAN_PACKAGE_SUGGESTS "sudo") -set(CPACK_RPM_PACKAGE_SUGGESTS "sudo") +set(CPACK_DEBIAN_PACKAGE_SUGGESTS "sudo, libdrm-dev, libdrm-amdgpu-dev") +set(CPACK_RPM_PACKAGE_SUGGESTS "sudo, libdrm-dev, libdrm-amdgpu-dev") ## Process the Debian install/remove scripts to update the CPACK variables configure_file(