MantisBT - CMake
View Issue Details
0014472CMakeCPackpublic2013-10-09 13:322016-06-10 14:31
Lee Graber 
Kitware Robot 
normalblockalways
closedmoved 
LinuxFedora19
CMake 2.8.10.2 
 
0014472: RPM Generator w/ component install and all comps in one package -> "name" property has "ALL_COMPONENTS_IN_ONE"
I am producing an RPM which I want to only contain certain "installed" components. I have set the following flags:
...
set(CPACK_RPM_COMPONENT_INSTALL ON)
set(CPACK_COMPONENTS_ALL <My list of components>)
set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1)
...

As per CPackRPM.cmake:

# Are we packaging components ?
if(CPACK_RPM_PACKAGE_COMPONENT)
  set(CPACK_RPM_PACKAGE_COMPONENT_PART_NAME "-${CPACK_RPM_PACKAGE_COMPONENT}")
  set(CPACK_RPM_PACKAGE_COMPONENT_PART_PATH "/${CPACK_RPM_PACKAGE_COMPONENT}")
  set(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/${CPACK_RPM_PACKAGE_COMPONENT}")
else()
  set(CPACK_RPM_PACKAGE_COMPONENT_PART_NAME "")
  set(CPACK_RPM_PACKAGE_COMPONENT_PART_PATH "")
  set(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}")
endif()

and then later:

Name: \@CPACK_RPM_PACKAGE_NAME\@\@CPACK_RPM_PACKAGE_COMPONENT_PART_NAME\@

I either need a way to override this, or, if CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE is set, then the part_name should be blank as it would be for a non-component install.
Create a package using the following flags:
set(CPACK_RPM_COMPONENT_INSTALL ON)
set(CPACK_COMPONENTS_ALL <My list of components>)
set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1)

either look at the generated spec or use rpm -qpi <rpm file> to see the name generated
This name is the name that users have to use to uninstall the rpm so it is important that it not be random like this. It makes discovery much more difficult. Since it is in the cmake file, I workaround this by changing the behavior myself but this appears to be the wrong behavior.
No tags attached.
Issue History
2013-10-09 13:32Lee GraberNew Issue
2016-06-10 14:29Kitware RobotNote Added: 0042388
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0042388)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.