View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0013826 | CMake | CMake | public | 2013-01-01 14:28 | 2013-06-03 09:05 | ||||
Reporter | ofir | ||||||||
Assigned To | Brad King | ||||||||
Priority | low | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | Any | OS | Linux | OS Version | |||||
Product Version | CMake 2.8.10.1 | ||||||||
Target Version | CMake 2.8.11 | Fixed in Version | CMake 2.8.11 | ||||||
Summary | 0013826: Problem with creating installation directories conatining a colon (:) | ||||||||
Description | When running 'make install' with DESTDIR to a directory containing a colon, cmake won't create parent directories. If parent directories already exist everything works fine. | ||||||||
Steps To Reproduce | With any cmake project that has some install() command: make install DESTDIR=aa/b:b <error> mkdir aa make install DESTDIR=aa/b:b <works> | ||||||||
Additional Information | The MakeDirectory function in Source/kwsys/SystemTools.cxx parses the directory tree after the first colon it finds, probably to eliminate drive name in Windows environment, although no #ifdef is in sight. Also, it seems that this code just below if(dir[dir.size()-1] == '/') { topdir = dir.substr(0, dir.size()); } else { topdir = dir; } does nothing. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0031958) Brad King (manager) 2013-01-02 11:52 |
The SystemTools::MakeDirectory code was inherited long ago from another project and obviously wasn't reviewed in detail. The logic doesn't make sense. As you observe it looks like it's trying to handle Windows drive letters somehow but all it does is skip over slashes before the first ':'. Try this patch: diff --git a/SystemTools.cxx b/SystemTools.cxx index f915e56..9925640 100644 --- a/SystemTools.cxx +++ b/SystemTools.cxx @@ -622,11 +622,7 @@ bool SystemTools::MakeDirectory(const char* path) } SystemTools::ConvertToUnixSlashes(dir); - kwsys_stl::string::size_type pos = dir.find(':'); - if(pos == kwsys_stl::string::npos) - { - pos = 0; - } + kwsys_stl::string::size_type pos = 0; kwsys_stl::string topdir; while((pos = dir.find('/', pos)) != kwsys_stl::string::npos) { @@ -634,14 +630,6 @@ bool SystemTools::MakeDirectory(const char* path) Mkdir(topdir.c_str()); pos++; } - if(dir[dir.size()-1] == '/') - { - topdir = dir.substr(0, dir.size()); - } - else - { - topdir = dir; - } if(Mkdir(topdir.c_str()) != 0) { // There is a bug in the Borland Run time library which makes MKDIR -- 1.7.10.4 |
(0031992) Brad King (manager) 2013-01-07 09:57 |
Patch applied to KWSys upstream: http://public.kitware.com/gitweb?p=KWSys.git;a=commitdiff;h=cb5f835f [^] and imported into CMake here: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6969515b [^] |
(0032003) Brad King (manager) 2013-01-08 08:49 |
Dumb mistake in patch fixed here: http://public.kitware.com/gitweb?p=KWSys.git;a=commitdiff;h=34177aec [^] and both patches re-imported into CMake here: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=495fa24d [^] |
(0033182) Robert Maynard (manager) 2013-06-03 09:05 |
Closing resolved issues that have not been updated in more than 4 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2013-01-01 14:28 | ofir | New Issue | |
2013-01-02 11:52 | Brad King | Note Added: 0031958 | |
2013-01-07 09:57 | Brad King | Note Added: 0031992 | |
2013-01-07 09:57 | Brad King | Assigned To | => Brad King |
2013-01-07 09:57 | Brad King | Status | new => resolved |
2013-01-07 09:57 | Brad King | Resolution | open => fixed |
2013-01-07 09:57 | Brad King | Fixed in Version | => CMake 2.8.11 |
2013-01-07 09:57 | Brad King | Target Version | => CMake 2.8.11 |
2013-01-08 08:49 | Brad King | Note Added: 0032003 | |
2013-06-03 09:05 | Robert Maynard | Note Added: 0033182 | |
2013-06-03 09:05 | Robert Maynard | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |