The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=13231 ====================================================================== Reported By: Jess Assigned To: ====================================================================== Project: CMake Issue ID: 13231 Category: CPack Reproducibility: always Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2012-05-17 00:05 EDT Last Modified: 2012-05-17 00:05 EDT ====================================================================== Summary: CPackDeb incorrectly "leaks" Debian dependencies across components Description: Dependency generation in the Debian control file using the CPACK_DEBIAN_PACKAGE_SHLIBS flag does not work correctly for components. Dependencies are generated, however each component is incorrectly assigned all previously processed components' dependencies on top of its own. This occurs regardless of whether the user explicitly set any (additional) dependencies via CPACK_DEBIAN_PACKAGE_DEPENDS.
Steps to Reproduce: 3 components, Comp1 has dependencies A, B, C, Comp3 Comp2 has dependencies D, E, F, Comp3 Comp3 has dependencies G relevant config: set(CPACK_COMPONENTS_IGNORE_GROUPS TRUE) set(CPACK_DEB_COMPONENT_INSTALL TRUE) set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS TRUE) We have no way of expressing dependencies between components for the purposes of Debian packaging (so far as I know) so Comp1 and Comp2 depending on Comp3 is not achievable. That aside, if CMake processes Comp1 then Comp2, then Comp3, the resultant Debian package Comp1 will depend on A, B, C, package Comp2 (incorrectly) on A, B, C, D, E, F and package Comp3 (incorrectly) on A, B, C, D, E, F, G. Additional Information: To fix I patched the CPackDeb.cmake script as follows, introducing new per-component user-defined dependency variable CPACK_DEB_<component>_PACKAGE_DEPENDS, which should be used over CPACK_DEBIAN_PACKAGE_DEPENDS if components are being used. 214,218c214,226 < IF (CPACK_DEBIAN_PACKAGE_DEPENDS) < SET (CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS}, ${CPACK_DEBIAN_PACKAGE_DEPENDS}") < ELSE (CPACK_DEBIAN_PACKAGE_DEPENDS) < SET (CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS}") < ENDIF (CPACK_DEBIAN_PACKAGE_DEPENDS) --- > IF(CPACK_DEB_PACKAGE_COMPONENT) > IF (CPACK_DEB_${CPACK_DEB_PACKAGE_COMPONENT}_PACKAGE_DEPENDS) > SET (CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS}, ${CPACK_DEB_${CPACK_DEB_PACKAGE_COMPONENT}_PACKAGE_DEPENDS}") > ELSE (CPACK_DEB_${CPACK_DEB_PACKAGE_COMPONENT}_PACKAGE_DEPENDS) > SET (CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS}") > ENDIF (CPACK_DEB_${CPACK_DEB_PACKAGE_COMPONENT}_PACKAGE_DEPENDS) > ELSE (CPACK_DEB_PACKAGE_COMPONENT) > IF (CPACK_DEBIAN_PACKAGE_DEPENDS) > SET (CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS}, ${CPACK_DEBIAN_PACKAGE_DEPENDS}") > ELSE (CPACK_DEBIAN_PACKAGE_DEPENDS) > SET (CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS}") > ENDIF (CPACK_DEBIAN_PACKAGE_DEPENDS) > ENDIF (CPACK_DEB_PACKAGE_COMPONENT) This config then will do the trick, also allowing 1 and 2's dependency on 3 to be expressed: set(CPACK_COMPONENTS_IGNORE_GROUPS TRUE) set(CPACK_DEB_COMPONENT_INSTALL TRUE) set(CPACK_DEB_1_PACKAGE_DEPENDS "myproject-3") set(CPACK_DEB_2_PACKAGE_DEPENDS "myproject-3") set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS TRUE) ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2012-05-17 00:05 Jess New Issue ====================================================================== -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers