MantisBT - CMake
View Issue Details
0012606CMakeCPackpublic2011-12-04 20:292016-06-10 14:31
Branan Purvine-Riley 
Eric NOULARD 
normalfeaturealways
closedmoved 
CMake 2.8.6 
 
0012606: Archive and STGZ packages don't respect CPACK_PACKAGE_INSTALL_DIRECTORY (patch included)
In the current cpack, Archive and STGZ packages will unpack to a directory named after CPACK_PACKAGE_NAME instead of CPACK_PACKAGE_INSTALL_DIRECTORY.
There are two parts to the attached patch:

1) Use CPACK_PACKAGE_INSTALL_DIRECTORY in the packaging temp directory, instead of CPACK_PACKAGE_NAME. This fixes archive packages.

2) Change CPACK_PACKAGE_NAME to CPACK_PACKAGE_INSTALL_DIRECTORY in a few places in the stgz header.
No tags attached.
related to 0012129closed Eric NOULARD Add top level directory to component install 
has duplicate 0013157closed Eric NOULARD Tarball generator should obey CPACK_PACKAGE_INSTALL_DIRECTORY as the root directory in the tarball 
related to 0013004closed Eric NOULARD Archive generator (TGZ, ZIP etc) doesn't work if component-based packaging is used with CPACK_SET_DESTDIR set to ON 
related to 0013019closed Kitware Robot The ZIP package generator does not find the files when CPACK_PACKAGING_INSTALL_PREFIX is set 
patch cmake_instdir.patch (2,333) 2011-12-04 20:29
https://public.kitware.com/Bug/file/4134/cmake_instdir.patch
Issue History
2011-12-04 20:29Branan Purvine-RileyNew Issue
2011-12-04 20:29Branan Purvine-RileyFile Added: cmake_instdir.patch
2011-12-05 02:24Eric NOULARDNote Added: 0027906
2011-12-12 15:19Eric NOULARDAssigned To => Eric NOULARD
2011-12-12 15:19Eric NOULARDStatusnew => assigned
2011-12-12 17:32Eric NOULARDRelationship addedrelated to 0012129
2011-12-12 17:33Eric NOULARDNote Added: 0027951
2011-12-12 17:47Eric NOULARDNote Added: 0027952
2012-02-25 17:55Eric NOULARDNote Added: 0028724
2012-02-25 17:55Eric NOULARDStatusassigned => feedback
2012-02-29 10:15Eric NOULARDRelationship addedrelated to 0013004
2012-03-06 16:45Eric NOULARDRelationship addedrelated to 0013019
2012-04-20 14:46Eric NOULARDRelationship addedhas duplicate 0013157
2016-06-10 14:28Kitware RobotNote Added: 0041939
2016-06-10 14:28Kitware RobotStatusfeedback => resolved
2016-06-10 14:28Kitware RobotResolutionopen => moved
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0027906)
Eric NOULARD   
2011-12-05 02:24   
Hi Branan,

Thank you for the patch.
The change may break current naming scheme.
You ara right about CPACK_PACKAGE_INSTALL_DIRECTORY, however
the only generator that seem to use this var is NSIS...
Other CPack generators just ignore it.

Nevertheless,
I'll have a look but did you try you patch with component install?
(0027951)
Eric NOULARD   
2011-12-12 17:33   
Added a related bug.
The current patch breaks (at least) DEB and RPM.
Just looking if it is easily fixable...
(0027952)
Eric NOULARD   
2011-12-12 17:47   
Ok,

We cannot do such kind of modification in cmCPackGenerator.cxx
it impacts all generators while most of them do currently cares
about CPACK_PACKAGE_INSTALL_DIRECTORY.

DEB & RPM would be broken by this.
It seems to be that the var is essentially useful for Archive generators.
May be yo could retry by making the modification in
Source/CPack/cmCPackArchiveGenerator.cxx.

You may try to overide "CPACK_TEMPORARY_DIRECTORY" in
cmCPackArchiveGenerator::InitializeInternal()
that way the change will only concern archive generators.

I have no time to do it myself now but I'll review an updated patch
if you do it.

Note that if you have a local CMake source tree you
may

1) cd buildtree
2) ctest -R CPack

in order to run CPack related tests, that way you'll see if some
generators did break.
(0028724)
Eric NOULARD   
2012-02-25 17:55   
Branan,

I won't have time to work on this now.
Would you be willing to try to provide an updated patch
(against current master) which:
  1) only concerns Archive generators
  2) works with component installation

If you provide such a patch I promise to review it AFAP
(As-Fast-As-Possible).
(0041939)
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.