MantisBT - CMake | |||||||||||||||
| View Issue Details | |||||||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||||
| 0014713 | CMake | CMake | public | 2014-01-20 11:06 | 2016-02-16 18:12 | ||||||||||
| Reporter | Alex Rettig | ||||||||||||||
| Assigned To | Brad King | ||||||||||||||
| Priority | normal | Severity | minor | Reproducibility | always | ||||||||||
| Status | closed | Resolution | fixed | ||||||||||||
| Platform | Linux | OS | OS Version | ||||||||||||
| Product Version | |||||||||||||||
| Target Version | CMake 3.0 | Fixed in Version | CMake 3.0 | ||||||||||||
| Summary | 0014713: cmake -create-symlink doesn't overwrite existing dangling(!) symlinks | ||||||||||||||
| Description | Calling create_symlink for an existing target file doesn't replace the link. Assuming there are no files "Target1" nor "Target2" in the current directory cmake -E create_symlink Target1 Link cmake -E create_symlink Target2 Link should leave a link Link -> Target2 but the result is Link -> Target1 If 'Target1' exists, before calling the second "create_symlink", the behaviour is correct and results in 'Link -> Target2' And yes, I have a use case, where I want to have a dangling symlink ;-) | ||||||||||||||
| Steps To Reproduce | See description. | ||||||||||||||
| Additional Information | See in cmake.cxx, where the case 'args[1] == "create_symlink"' is handled. Looks correct on the first sight, but: most likely 'cmSystemTools::FileExists(destinationFileName)' doesn't return true for a dangling symlink 'destinationFileName', and therefore after the first 'if' statement the following code leading to '!cmSystemTools::RemoveFile(destinationFileName)' isn't executed. Solution: distinguish correctly for symlinks, whether link or targed doesn't exist. Or: remove the file 'destinationFileName' unconditionally. | ||||||||||||||
| Tags | No tags attached. | ||||||||||||||
| Relationships |
| ||||||||||||||
| Attached Files | |||||||||||||||
| Issue History | |||||||||||||||
| Date Modified | Username | Field | Change | ||||||||||||
| 2014-01-20 11:06 | Alex Rettig | New Issue | |||||||||||||
| 2014-01-20 11:10 | Alex Rettig | Note Added: 0034974 | |||||||||||||
| 2014-01-20 11:11 | Alex Rettig | Note Edited: 0034974 | bug_revision_view_page.php?bugnote_id=34974#r1374 | ||||||||||||
| 2014-01-20 11:17 | Brad King | Relationship added | related to 0004418 | ||||||||||||
| 2014-01-20 13:54 | Brad King | Assigned To | => Brad King | ||||||||||||
| 2014-01-20 13:54 | Brad King | Status | new => assigned | ||||||||||||
| 2014-01-20 13:54 | Brad King | Target Version | => CMake 3.0 | ||||||||||||
| 2014-01-21 08:54 | Brad King | Note Added: 0034982 | |||||||||||||
| 2014-01-21 08:55 | Brad King | Status | assigned => resolved | ||||||||||||
| 2014-01-21 08:55 | Brad King | Resolution | open => fixed | ||||||||||||
| 2014-01-21 08:55 | Brad King | Fixed in Version | => CMake 3.0 | ||||||||||||
| 2014-05-23 13:39 | Brad King | Relationship added | related to 0014928 | ||||||||||||
| 2014-05-26 06:19 | Alex Rettig | Note Added: 0035929 | |||||||||||||
| 2014-05-26 06:19 | Alex Rettig | Status | resolved => closed | ||||||||||||
| Notes | |||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||