[cmake-developers] rpm/deb component issue
Clinton Stimpson
clinton at elemtech.com
Wed Oct 24 15:41:28 EDT 2012
On Wednesday, October 24, 2012 09:27:38 PM Eric Noulard wrote:
> 2012/10/24 Clinton Stimpson <clinton at elemtech.com>:
> > On Wednesday, October 24, 2012 11:59:52 AM Clinton Stimpson wrote:
> >> I have a problem with the rpm & deb cpack generators.
> >>
> >> I've set the following:
> >> set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1)
> >> set(CPACK_DEB_COMPONENT_INSTALL 1)
> >> set(CPACK_RPM_COMPONENT_INSTALL 1)
> >>
> >> I get this implementation detail string "ALL_COMPONENTS_IN_ONE" being put
> >> in the package name (that is name, not the filename), so I end up with
> >> "mypackage- ALL_COMPONENTS_IN_ONE". To remove it, I do "yum remove
> >> mypackage- ALL_COMPONENTS_IN_ONE".
> >> I would rather just have "mypackage" since that is the name I've
> >> specified.
> >> But I don't see a way to override it.
>
> This is clearly a bug, I can't see any way to fix without a small patch.
> Note that the DEB generator does not seem to suffer from this, is it?
>
> When the xx.deb file is generated you can check it (without installing)
> using dpkg-deb --info xx.deb
> dpkg-deb --contents xx.deb
> dpkg-deb --show xx.deb
>
> >> Does anyone have a suggested way for me to fix cmCPack*Generator.cxx
> >> and/or
> >> CPackDeb.cmake, CPackRPM.cmake? This is the first time I've looked at
> >> modifying those particular files.
>
> I think the best current workaround is to change CPackRPM.cmake.
>
> > I have an idea that I'm comfortable with. I'm effectively separating a
> > variable into two, one for the component name, and another for the
> > directory where it can be found. For the ALL_COMPONENTS_IN_ONE mode, the
> > directory can be ALL_COMPONENTS_IN_ONE/, but the component name empty.
> > Let me know if you disagree.D
>
> I agree and ended-up with the same patch (in CPackRPM.cmake).
> You'll find my patch (against CMake master) proposal attached,
> I'm not really sure it's the "right final fix" though.
>
> Clint would you be kind enough to open a bug report for that please?
The Deb generator suffers from the same problem.
Attached is my patch which is working fine for me. Does it look OK? I did the
approach of simplifying the .cmake files and putting the implementation specific
logic in the cmCPack*.cxx files.
--
Clinton Stimpson
Elemental Technologies, Inc
Computational Simulation Software, LLC
www.csimsoft.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-RPM-Deb-Fix-package-names-to-not-include-ALL_COMPONE.patch
Type: text/x-patch
Size: 5384 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20121024/ce18f2dd/attachment-0001.bin>
More information about the cmake-developers
mailing list