View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007410CMakeCPackpublic2008-07-28 10:002010-12-11 17:25
ReporterYuri 
Assigned ToEric NOULARD 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake-2-6 
Target VersionFixed in VersionCMake 2.8.3 
Summary0007410: CPack SET_DESTDIR feature is broken by Components installation
DescriptionI'm playing with cmake-2.6.1-RC11 (from CMake-2.6 CVS branch). I try to create RPM package with CPACK_SET_DESTDIR ON, but this fails:
=(%:~/devel/distrib/cmake-2.6/build)=- ./bin/cpack --config cpack-test.cmake
CPack: Create package using RPM
CPack: Install projects
CPack: - Run preinstall target for: CMake
CPack: - Install project: CMake
CPack Error: Problem creating temporary directory: /opt/cmake
CPack Error: Error when generating package: cmake

In cmake-2.6 this works.
TagsNo tags attached.
Attached Files? file icon cpack-test.cmake [^] (564 bytes) 2008-07-28 10:00
patch file icon cpack_set_destdir_fix.patch [^] (995 bytes) 2008-07-28 10:06 [Show Content]

 Relationships
related to 0007000closedEric NOULARD CPack RPM generator should always "CPACK_SET_DESTDIR" 

  Notes
(0012835)
Yuri (reporter)
2008-07-28 10:09

When using CPACK_SET_DESTDIR, there may be no CPACK_INSTALL_PREFIX directory or it may be inaccessible. Proposed patch work for me.
(0012838)
Douglas Gregor (developer)
2008-07-28 16:17

This patch will break generation of packages for empty components on Mac OS X (and, possibly, NSIS). How about we make the creation of the temporary directory only occur when CPACK_SET_DESTDIR is not set?
(0012848)
Yuri (reporter)
2008-07-29 03:01

Hmm... This patch does it. I removed mktmpdir only when set_destdir is on (in one branch of condition). I supposed you've added this code to both branches by mistake.

I think your comment is reasonable: when you don't use DESTDIR you know full path and free to create it. But with DESTDIR is set, creating CPACK_INSTALL_PREFIX looses any sense: Usually it points to some system path, but package is built under restricted user.
(0023799)
Eric NOULARD (developer)
2010-12-08 12:11

I'll have a look,
but I think this one is clearly oldish
and should certainly be closed.

CPack 2.8.3 should be able to handle all know cases:

- With ou Without Absolute Path in install rules
- CPACK_SET_DESTDIR OFF or ON

The "only" trouble is that if CPACK_SET_DESTDIR is ON
and there are one or more Absolute Path in install rules
then the generated RPM will not be relocatable.

I'll close it after some tests.
(0023898)
Eric NOULARD (developer)
2010-12-11 17:25

This bug is now obsolete.
I did not do backward search in order to see when exactly
but as of CMake 2.8.3 this is not an issue any longer.

Closing it.

 Issue History
Date Modified Username Field Change
2008-07-28 10:00 Yuri New Issue
2008-07-28 10:00 Yuri File Added: cpack-test.cmake
2008-07-28 10:06 Yuri File Added: cpack_set_destdir_fix.patch
2008-07-28 10:09 Yuri Note Added: 0012835
2008-07-28 10:53 Bill Hoffman Status new => assigned
2008-07-28 10:53 Bill Hoffman Assigned To => Douglas Gregor
2008-07-28 16:17 Douglas Gregor Note Added: 0012838
2008-07-29 03:01 Yuri Note Added: 0012848
2008-09-05 10:57 Brad King Relationship added related to 0007000
2010-12-08 10:32 David Cole Assigned To Douglas Gregor => Eric NOULARD
2010-12-08 12:11 Eric NOULARD Note Added: 0023799
2010-12-11 17:25 Eric NOULARD Note Added: 0023898
2010-12-11 17:25 Eric NOULARD Status assigned => closed
2010-12-11 17:25 Eric NOULARD Resolution open => fixed
2010-12-11 17:25 Eric NOULARD Fixed in Version => CMake 2.8.3


Copyright © 2000 - 2018 MantisBT Team