MantisBT - CMake | |||||||||||||||
View Issue Details | |||||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||||
0013231 | CMake | CPack | public | 2012-05-17 00:05 | 2015-11-02 09:15 | ||||||||||
Reporter | Jess | ||||||||||||||
Assigned To | Raffi Enficiaud | ||||||||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||||||||
Status | closed | Resolution | fixed | ||||||||||||
Platform | Linux | OS | Ubuntu 64-bit | OS Version | 12.04 | ||||||||||
Product Version | CMake 2.8.7 | ||||||||||||||
Target Version | Fixed in Version | CMake 3.3 | |||||||||||||
Summary | 0013231: 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) | ||||||||||||||
Tags | No tags attached. | ||||||||||||||
Relationships |
| ||||||||||||||
Attached Files | |||||||||||||||
Issue History | |||||||||||||||
Date Modified | Username | Field | Change | ||||||||||||
2012-05-17 00:05 | Jess | New Issue | |||||||||||||
2012-05-23 05:29 | Eric NOULARD | Relationship added | related to 0012062 | ||||||||||||
2012-08-11 21:35 | David Cole | Status | new => backlog | ||||||||||||
2012-08-11 21:35 | David Cole | Note Added: 0030424 | |||||||||||||
2015-05-14 12:58 | Raffi Enficiaud | Assigned To | => Raffi Enficiaud | ||||||||||||
2015-05-14 12:58 | Raffi Enficiaud | Status | backlog => assigned | ||||||||||||
2015-05-14 12:59 | Raffi Enficiaud | Note Added: 0038747 | |||||||||||||
2015-05-14 13:00 | Raffi Enficiaud | Relationship added | child of 0011944 | ||||||||||||
2015-05-18 11:34 | Domen Vrankar | Note Added: 0038766 | |||||||||||||
2015-05-18 11:34 | Domen Vrankar | Status | assigned => resolved | ||||||||||||
2015-05-18 11:34 | Domen Vrankar | Fixed in Version | => CMake 3.3 | ||||||||||||
2015-05-18 11:34 | Domen Vrankar | Resolution | open => fixed | ||||||||||||
2015-11-02 09:15 | Robert Maynard | Note Added: 0039814 | |||||||||||||
2015-11-02 09:15 | Robert Maynard | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|