Package: cmake
Version: 2.8.12.1-1.3
Severity: normal
Tags: patch
--- Please enter the report below this line. ---
Hi.
If I try to create a source package with cmake via CPack and "make
package_source" and there is a directory in the sources, that only
contains symlinks (only one in my case), the generation of the
source package fails with:
CPack Error: Cannot create symlink: <source> --> <destination>
where source and destination are the file/symlink names of course.
It seems CPack tries to create the paths for the destination only if
it copies files and not when creating symlinks.
The following patch fixes this for me. I don't know, if this is
actually the right place to put this, but it should point to the
exact problem.
diff -Naur cmake-2.8.12.1_orig/Source/kwsys/SystemTools.cxx
cmake-2.8.12.1/Source/kwsys/SystemTools.cxx
--- cmake-2.8.12.1_orig/Source/kwsys/SystemTools.cxx 2013-11-05
20:07:23.000000000 +0100
+++ cmake-2.8.12.1/Source/kwsys/SystemTools.cxx 2014-05-30 14:25:23.912154919
+0200
@@ -2835,6 +2835,9 @@
#else
bool SystemTools::CreateSymlink(const char* origName, const char* newName)
{
+ kwsys_stl::string destination_dir = newName;
+ destination_dir = GetFilenamePath(destination_dir);
+ MakeDirectory(destination_dir.c_str());
return symlink(origName, newName) >= 0;
}
#endif
Regards
Andre
--- System information. ---
Architecture: amd64
Kernel: Linux 3.14-rc7-amd64
Debian Release: jessie/sid
500 unstable ftp.de.debian.org
500 unstable ftp-stud.hs-esslingen.de
--- Package information. ---
Depends (Version) | Installed
=================================-+-=================
libarchive13 | 3.1.2-8
libc6 (>= 2.15) |
libcurl3 (>= 7.16.2) |
libexpat1 (>= 2.0.1) |
libgcc1 (>= 1:4.1.1) |
libstdc++6 (>= 4.6) |
zlib1g (>= 1:1.2.3.3) |
cmake-data (= 2.8.12.1-1.3) |
procps |
Recommends (Version) | Installed
=========================-+-===========
make | 4.0-7
gcc | 4:4.8.2-4
Suggests (Version) | Installed
=========================-+-===========
codeblocks |
eclipse | 3.8.1-5.1
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]