View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013231CMakeCPackpublic2012-05-17 00:052015-11-02 09:15
ReporterJess 
Assigned ToRaffi Enficiaud 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformLinuxOSUbuntu 64-bitOS Version12.04
Product VersionCMake 2.8.7 
Target VersionFixed in VersionCMake 3.3 
Summary0013231: CPackDeb incorrectly "leaks" Debian dependencies across components
DescriptionDependency 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 Reproduce3 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 InformationTo 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)
TagsNo tags attached.
Attached Files

 Relationships
related to 0012062closedDomen Vrankar CPackDeb: The EXTRA control files may not be specified on a per-component basis 
child of 0011944closedRaffi Enficiaud CPackDeb: Support dependencies between components/Debian packages 

  Notes
(0030424)
David Cole (manager)
2012-08-11 21:35

Sending old, never assigned issues to the backlog.

(The age of the bug, plus the fact that it's never been assigned to anyone means that nobody is actively working on it...)

If an issue you care about is sent to the backlog when you feel it should have been addressed in a different manner, please bring it up on the CMake mailing list for discussion. Sign up for the mailing list here, if you're not already on it: http://www.cmake.org/mailman/listinfo/cmake [^]

It's easy to re-activate a bug here if you can find a CMake developer who has the bandwidth to take it on, and ferry a fix through to our 'next' branch for dashboard testing.
(0038747)
Raffi Enficiaud (developer)
2015-05-14 12:59

I believe this was fixed in next for 3.3 with the latest changes.
(0038766)
Domen Vrankar (developer)
2015-05-18 11:34

Fixed with commit:
http://www.cmake.org/gitweb?p=cmake.git;a=commit;h=c8375e1 [^]
(0039814)
Robert Maynard (manager)
2015-11-02 09:15

Closing resolved issues that have not been updated in more than 4 months.

 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


Copyright © 2000 - 2018 MantisBT Team