[cmake-developers] [PATCH] CPackRPM: unset temporary component variable fixed

Domen Vrankar domen.vrankar at gmail.com
Mon Nov 17 17:22:01 EST 2014


2014-11-17 23:05 GMT+01:00 Domen Vrankar <domen.vrankar at gmail.com>:
> 2014-11-17 21:09 GMT+01:00 Brad King <brad.king at kitware.com>:
>> On 11/17/2014 02:46 PM, Gauthier Lamaison wrote:
>>> I've been trying to make multiple RPMs using components, but it appears
>>> that the component variables such as CPACK_RPM_<componentName>_PACKAGE_REQUIRES
>>> are not correctly unset. Worse, they are propagated to other components
>>> (that's how I found myself having my devel RPM package requirements in my
>>> libs RPM package...)
>>>
>>> Please find attach a small patch that fixes the problem (at least in my case).
>>
>> Thanks.  This looks like a more complete version of commit v2.8.9~136^2:
>>
>>  CPackRPM: avoid leakage of RPM directive from one component to another.
>>  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7321c94e
>>  CPackRPM bug - empty per-component REQUIRES
>>  http://www.cmake.org/Bug/view.php?id=13248
>>
>> Would a CPackRPM maintainer please review the logic updates?
>
> Patch looks OK. Can you please apply it?

Gauthier would you also be willing to write a test for this patch?

You could extend the test that is already on master branch of git
repository in directory cmake/Tests/CPackComponentsForAll.
MyLibCPackConfig-IgnoreGroup.cmake.in contains the location where you
can set component variables - if(CPACK_GENERATOR MATCHES "RPM")
section
RunCPackVerifyResult.cmake contains checking of expected results (see
the end of the script)
Since the component variables logic is written in a for loop test of
one variable would be enough.

Thanks,
Domen


More information about the cmake-developers mailing list