[cmake-developers] [CMake 0014609]: cmake -E copy and cmake -E copy_directory commands need an option to NOT follow symlinks on Linux
Mantis Bug Tracker
mantis at public.kitware.com
Sat Nov 30 18:41:26 EST 2013
The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=14609
======================================================================
Reported By: irwin
Assigned To:
======================================================================
Project: CMake
Issue ID: 14609
Category: CMake
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2013-11-30 18:41 EST
Last Modified: 2013-11-30 18:41 EST
======================================================================
Summary: cmake -E copy and cmake -E copy_directory commands
need an option to NOT follow symlinks on Linux
Description:
It is known but not documented (see bug 13204) that both "cmake -E copy" and
"cmake -E copy_directory" currently follow symlinks on Linux. This results in a
particularly bad situation when attempting to copy a directory that happens to
contain a broken symlink, e.g.,
software at raven> ls -l test_symlink
total 0
lrwxrwxrwx 1 software software 3 Nov 30 13:29 new -> old
software at raven> cmake -E copy_directory test_symlink test_symlink1
Error copying directory from "test_symlink" to "test_symlink1".
When I encountered this much too generic error message when using copy_directory
for a very large directory recently I initially had no idea whether I was
dealing with an i/o error or whatever, and it is only by chance that I
discovered a botched exit from emacs in that directory had created a broken
symlink.
Thus, at minimum bug 13204 should be fixed and also copy_directory (and copy)
should have a much more specific error message identifying both the symlink and
the non-existent file that is causing the trouble.
In addition, a (Unix-only) option to NOT follow symlinks should also be
implemented for copy_directory and copy. After all, every GNU utility by
default does not follow symlinks on Unix so it would be nice if at least this
option was implemented for the cmake -E copy_directory and cmake -E copy
commands on Unix.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2013-11-30 18:41 irwin New Issue
======================================================================
More information about the cmake-developers
mailing list