View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0014192 | CMake | CMake | public | 2013-06-04 01:00 | 2013-11-04 09:33 | ||||
Reporter | Yichao Yu | ||||||||
Assigned To | |||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | won't fix | ||||||
Platform | Linux | OS | Arch Linux | OS Version | |||||
Product Version | CMake 2.8.11 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0014192: get_filename_component(REALPATH) doesn't resolve symlink if the file doesn't exists. | ||||||||
Description | get_filename_component(REALPATH) doesn't resolve any intermediate symlinks if the file does not exist. This means the function can return different value on a output file before and after the build (which may be a minor problem in some cases) and is also not consistent with realpath(1) or realpath(3), which will resolve symlinks from the beginning until the path that is not exist. | ||||||||
Steps To Reproduce | execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink /tmp tmp WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") get_filename_component(real_path "tmp/not-exist-file" REALPATH) message("${real_path}") file(REMOVE tmp) expected output: /tmp/not-exist-file actual output: ....(what ever CMAKE_CURRENT_SOURCE_DIR is).../tmp/not-exist-file | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | ||||||
|
Relationships |
Notes | |
(0033221) Brad King (manager) 2013-06-04 08:07 |
The realpath primitive is not guaranteed to resolve any symlinks when the final destination does not exist. Since 2.8.11 was released we've updated the documentation: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=df71f968 [^] to state that the file must exist for REALPATH to work. |
(0034359) Robert Maynard (manager) 2013-11-04 09:33 |
Closing resolved issues that have not been updated in more than 4 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2013-06-04 01:00 | Yichao Yu | New Issue | |
2013-06-04 08:04 | Brad King | Relationship added | related to 0014091 |
2013-06-04 08:07 | Brad King | Note Added: 0033221 | |
2013-06-04 08:07 | Brad King | Status | new => resolved |
2013-06-04 08:07 | Brad King | Resolution | open => won't fix |
2013-11-04 09:33 | Robert Maynard | Note Added: 0034359 | |
2013-11-04 09:33 | Robert Maynard | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |