MantisBT - CMake
View Issue Details
0012366CMakeCPackpublic2011-07-28 07:312012-02-06 06:07
winfriedd 
Eric NOULARD 
highmajoralways
closedfixed 
LinuxOpenSuse Linux11.4
CMake 2.8.5 
CMake 2.8.6CMake 2.8.6 
0012366: when using different components RPM packages have the same package name
The RPM CPack generator can now generate multiple RPMs per project based on the COMPONENT feature of cmake.

However the generated RPMs all have the same package name. When you install the first package no problem. When you try to install the second package you will get an error:
'package foo is already installed'
Download attached test project, which has two components.
build the project and the RPMs (make package).

Now try to install both generated RPMs. Installation of the second RPM will fail.
Suggested patch to CPackRPM.cmake attached.
No tags attached.
has duplicate 0012468closed Brad King Package naming with COMPONENTS is broken 
bz2 rpmcomponenttest.tar.bz2 (1,304) 2011-07-28 07:31
https://public.kitware.com/Bug/file/3984/rpmcomponenttest.tar.bz2
diff CPackRPM.cmake.diff (996) 2011-07-28 07:59
https://public.kitware.com/Bug/file/3986/CPackRPM.cmake.diff
Issue History
2011-07-28 07:31winfrieddNew Issue
2011-07-28 07:31winfrieddFile Added: rpmcomponenttest.tar.bz2
2011-07-28 07:59winfrieddFile Added: CPackRPM.cmake.diff
2011-07-28 08:01winfrieddNote Added: 0027096
2011-07-28 08:09Eric NOULARDNote Added: 0027097
2011-07-28 08:09Eric NOULARDAssigned To => Eric NOULARD
2011-07-28 08:09Eric NOULARDStatusnew => assigned
2011-09-05 14:25Eric NOULARDNote Added: 0027354
2011-09-05 14:26Eric NOULARDNote Added: 0027355
2011-09-05 14:26Eric NOULARDTarget Version => CMake 2.8.6
2011-09-05 14:27Eric NOULARDNote Added: 0027356
2011-09-05 14:27Eric NOULARDStatusassigned => resolved
2011-09-05 14:27Eric NOULARDFixed in Version => CMake 2.8.6
2011-09-05 14:27Eric NOULARDResolutionopen => fixed
2011-09-19 14:28Brad KingRelationship addedhas duplicate 0012468
2012-02-06 06:07David ColeNote Added: 0028492
2012-02-06 06:07David ColeStatusresolved => closed

Notes
(0027096)
winfriedd   
2011-07-28 08:01   
The attached patch (against CPackRPM.cmake of cmake 2.8.5) will append the component name to the package name if CPACK_RPM_COMPONENT_INSTALL is set to ON.
(0027097)
Eric NOULARD   
2011-07-28 08:09   
Argh...
Thank you for the report and the patch
I'll try to merge-in that fix soon.
(0027354)
Eric NOULARD   
2011-09-05 14:25   
Just pushed to next a slightly different fix
b0f6a97 CPack fix 0012366 components RPM packages have the same package name
(0027355)
Eric NOULARD   
2011-09-05 14:26   
Hi CMake dev,

Would be nice if there is any 2.8.6 RC left to put this on the road.
If not let it be for 2.8.7.
(0027356)
Eric NOULARD   
2011-09-05 14:27   
Possibly in 2.8.6.

The fix is harmless and not fixing it make RPM components pretty useless...
(0028492)
David Cole   
2012-02-06 06:07   
Closing resolved issues that have not been updated in more than 4 months.