Notes |
|
(0026619)
|
David Cole
|
2011-05-26 10:50
|
|
Not for 2.8.5 - postponing until a future release |
|
|
(0027563)
|
Daniel Morlock
|
2011-10-11 10:05
|
|
Attached a patch for CPackRPM.cmake in 2.8.6 to define different RPM spec headers for different components e.g. CPACK_RPM_mycomponent_PACKAGE_PROVIDES, CPACK_RPM_mycomponent_PACKAGE_REQUIRES |
|
|
(0027673)
|
Eric NOULARD
|
2011-10-30 15:19
|
|
Just merged a modified version of the provided patch to next.
Thank you very much for that.
With that addition the dependency between components is not [yet] automatic
but at least it can be specified by hand.
Merge topic 'CPackRPM-perComponentHeader' into next
e20c59a CPackRPM support component specific variables for spec files. |
|
|
(0030653)
|
Eric NOULARD
|
2012-08-14 14:33
|
|
Unfortunately I have not the time to work on this now. |
|
|
(0035563)
|
Barthelemy von Haller
|
2014-03-31 05:50
|
|
I attach a patch for CPackRPM.cmake (2.8.12) that creates the inter-component dependencies. It needs review and testing, I have just tested it with my software and it worked. |
|
|
(0035597)
|
Eric NOULARD
|
2014-04-01 09:24
|
|
Barthelemy could you provide a working example for you.
The patch looks OK but shouldn't work in all grouping case,
see: http://www.cmake.org/Wiki/CMake:Component_Install_With_CPack#Controlling_Differents_Ways_of_packaging_components [^]
Moreover I think tha currently the definition of
"CPACK_COMPONENT_${CPACK_RPM_PACKAGE_COMPONENT}_DEPENDS"
is case sensitive, may be one should always use
string(TOUPPER ${CPACK_RPM_PACKAGE_COMPONENT} UPPER_COMPNAME)
instead of CPACK_RPM_PACKAGE_COMPONENT.
Beware not to mix tab and space in you patch/source modification.
Use space only (no tab) please. |
|
|
(0036673)
|
Barthelemy von Haller
|
2014-08-25 08:24
|
|
Hello,
Sorry for the excessive delay in my reply. Next iteration will be faster.
For the grouping cases, I am not sure what is missing.
1. ALL_COMPONENTS_IN_ONE : CPACK_RPM_PACKAGE_COMPONENT is false, my code is ignored. My debug output should actually be within the if, I will change that.
2. IGNORE : it successfully process the dependencies considering that there is one package per component.
3. ONE_PER_GROUP : this case is not handled for RPMs. I see that if I declare groups and use this option I still get 1 rpm per component. Thus it is equivalent to IGNORE. If a day it is implement, then we should of course adapt the code.
For the casing of "CPACK_COMPONENT_${CPACK_RPM_PACKAGE_COMPONENT}_DEPENDS" I would not change it. First, it doesn't work anymore if I do so, possibly because it is at some point compared with CPACK_COMPONENTS_ALL. Second, if it is case sensitive there is no obvious reason to make it case insensitive (by putting it all uppercase). Users should be careful to have consistent components naming e.g. core != CORE != Core.
I will change the tabs into spaces, sorry about that.
I will shortly upload a new diff with the 2 changes mentioned above and a simple working example.
Best regards |
|
|
(0036675)
|
Barthelemy von Haller
|
2014-08-25 09:07
|
|
Hi again,
I made a mistake. ONE_PER_GROUP option works and must be handled. I will do it.
Sorry for the confusion.
Maybe I will also understand the "upper case" thing soon :)
Barth |
|
|
(0036678)
|
Barthelemy von Haller
|
2014-08-26 07:45
|
|
Please find attached a new diff. It contains changes to CPackRPM.cmake implementing dependencies between components.
It handles the different CPACK_COMPONENTS_GROUPING. The code is more complicated due to that.
I tested it for various cases such as group-less components, dependencies between components of the same group or multiple dependencies from one group to another.
The working example I use is unfortunately copyrighted by my company. I can send it to you Eric Noulard for test purpose but can't post it here. Would it be ok like this ?
Best regards,
Barth |
|
|
(0037396)
|
Eric NOULARD
|
2014-12-05 10:36
|
|
Domen,
Would you be kind enough to have a look at Barthelemy proposal? |
|
|
(0037555)
|
Domen Vrankar
|
2015-01-05 07:03
|
|
Sorry for the late response...
I've looked the patch and tested it with the tests that come with CMake.
I haven't yet tested it allot but it doesn't work with the tests that come with CMake. Tests pass but only because generated RPM files are not semantically checked a whole lot (diffs of generated spec files are more revealing).
There are a few obvious problems:
1)
SET(CPACK_RPM_${CURRENT_PKG}_PACKAGE_REQUIRES "")
This line unsets the value that is provided by the user and thus breaks back compatibility.
CMake file Tests/CPackComponentsForAll/MyLibCPackConfig-OnePackPerGroup.cmake.in contains set(CPACK_RPM_Development_PACKAGE_REQUIRES "mylib-Runtime") and even though this variable name is not documented it is present in tests and usable in the past so I would say that the back compatibility should be preserved.
2)
All if(DEFINED *) and if(NOT DEFINED *) tests should be replaced by if set checks (just delete DEFINED) since even if a variable is defined it can still contain an empty string and such values should be ignored as well to prevent "Requires: , some_value" variable contents.
3)
Even if I remove DEFINED values I still get "Requires: ," and "Requires: " values in spec files.
Could you also fix the above cases? |
|
|
(0041772)
|
Kitware Robot
|
2016-06-10 14:28
|
|
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. |
|