View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004418CMakeCMakepublic2007-02-06 16:342014-01-20 11:17
ReporterAlex Neundorf 
Assigned ToSystem Admin 
PrioritylowSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0004418: cmake -create-symlink doesn't overwrite existing symlinks
DescriptionHi,

cmake -E create_symlink old new

doesn't change/create "new" if it already exists. So if "new" already exists and it points to "/usr/foo", but I want it to point to "/usr/bar", create_symlink doesn't do this, the symlink is unchanged.

This seems to be the case both on Linux and OSX. It can be worked around be removing the symlink first.

Alex
TagsNo tags attached.
Attached Files

 Relationships
related to 0014713closedBrad King cmake -create-symlink doesn't overwrite existing dangling(!) symlinks 

  Notes
(0006371)
Bill Hoffman (manager)
2007-02-07 11:37

Well ln -s does the same thing, right?
(0006437)
Alex Neundorf (developer)
2007-02-15 14:40

Not exactly. Just "ln -s" fails with an error message in this case. "ln -f -s" creates the new symlink. Both is better than silently failing.


$ ln -s old new
$ ln -s oldx new
ln: `new': File exists
$ ln -f -s oldx new
$ ls -al
lrwxrwxrwx 1 alex users 4 Feb 15 20:38 new -> oldx
(0006441)
System Admin (reporter)
2007-02-15 15:07

Checking for path: /cvsroot/CMake/CMake/Source
Unrestricted user: andy
/cvsroot/CMake/CMake/Source/cmake.cxx,v <-- cmake.cxx
new revision: 1.279; previous revision: 1.278

 Issue History
Date Modified Username Field Change
2014-01-20 11:17 Brad King Relationship added related to 0014713


Copyright © 2000 - 2018 MantisBT Team