Bug 1369 - coreutils\' ln: fails with --target-dir
: coreutils\' ln: fails with --target-dir
Status: CLOSED FIXED
: Sisyphus
(All bugs in Sisyphus/fileutils)
: unstable
: all Linux
: P3 major
Assigned To:
:
:
:
:
:
  Show dependency tree
 
Reported: 2002-10-08 00:48 by
Modified: 2003-08-25 15:18 (History)


Attachments
0001369-coreutils-4.5.2-alt-ln-target_directory.patch (586 bytes, application/octet-stream)
2002-10-08 17:26, imz
no flags Details


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2002-10-08 00:48:42
Does its job, but complains about an error and exits with an error code.

---
$ mkdir dir; touch src; ln -s --target-dir=dir ../src; echo $?; ls -l src dir
ln: `dir/.\': cannot overwrite directory
1
-rw-r--r--    1 imz      imz             0 Окт  8 00:36 src

dir:
итого 0
lrwxrwxrwx    1 imz      imz             6 Окт  8 00:36 src -> ../src
[<a href="mailto:imz@basalt" target="_new">imz@basalt</a> tmp]$ rpm -qf /bin/ln
coreutils-4.5.1-alt2
[<a href="mailto:imz@basalt" target="_new">imz@basalt</a> tmp]$

---
Putting \&quot;dir\&quot; as the last argument makes it work.

Similar 

cp --target-dir=dir src

works fine.

This:

cp --symbolic-link --target-dir=dir \&quot;$(pwd)\&quot;/src

also works; can be regarded as a workaround.

------- Comment #1 From 2002-10-08 17:28:14 -------
Fixed in coreutils-4.5.2-alt1
(patch for coreutils-4.5.2 attached).
------- Comment #2 From 2002-10-08 17:28:14 -------
Fixed in coreutils-4.5.2-alt1
(patch for coreutils-4.5.2 attached).
------- Comment #3 From 2002-10-08 18:48:14 -------
Merged into coreutils-4.5.3
------- Comment #4 From 2002-10-08 18:48:14 -------
Merged into coreutils-4.5.3