Hi there, First, I would like to thank you for your amazing work on CMake, CPack and CTest.
I've been trying to make multiple RPMs using components, but it appears that the component variables such as CPACK_RPM_<componentName>_PACKAGE_REQUIRES are not correctly unset. Worse, they are propagated to other components (that's how I found myself having my devel RPM package requirements in my libs RPM package...) Please find attach a small patch that fixes the problem (at least in my case). Thank you, Gauthier
From aa90bab5dda090efac3ef58740a9c7d6297f35d3 Mon Sep 17 00:00:00 2001 From: Gauthier Lamaison <[email protected]> Date: Mon, 17 Nov 2014 20:29:29 +0100 Subject: [PATCH] CPackRPM: unset temporary component variable fixed --- Modules/CPackRPM.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index 66717ef..d2cb2ee 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -678,6 +678,8 @@ foreach(_RPM_SPEC_HEADER URL REQUIRES SUGGESTS PROVIDES OBSOLETES PREFIX CONFLIC endif() endif() + # Do not forget to unset previously set header (from previous component) + unset(TMP_RPM_${_RPM_SPEC_HEADER}) # Treat the RPM Spec keyword iff it has been properly defined if(DEFINED CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP) # Transform NAME --> Name e.g. PROVIDES --> Provides @@ -698,9 +700,7 @@ foreach(_RPM_SPEC_HEADER URL REQUIRES SUGGESTS PROVIDES OBSOLETES PREFIX CONFLIC message("CPackRPM:Debug: User defined ${_PACKAGE_HEADER_NAME}:\n ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP}") endif() set(TMP_RPM_${_RPM_SPEC_HEADER} "${_PACKAGE_HEADER_NAME}: ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP}") - else() - # Do not forget to unset previously set header (from previous component) - unset(TMP_RPM_${_RPM_SPEC_HEADER}) + unset(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP) endif() endforeach() -- 2.1.2
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
