--- Begin Message ---
Subject: |
[bug-coreutils] ln 8.31 on Solaris 10 is partially broken |
Date: |
Fri, 15 Mar 2019 17:43:43 -0600 |
There appears to be a problem on Solaris 10 (and possibly related
Solaris family members) with ln in coreutils-8.31:
With the new ln:
> rm foo bar ; touch foo bar && ls -ld foo bar && ln -f foo bar
rm: cannot remove 'foo': No such file or directory
rm: cannot remove 'bar': No such file or directory
-rw-rw-r-- 1 bowman sysstaff 0 Mar 15 15:55 bar
-rw-rw-r-- 1 bowman sysstaff 0 Mar 15 15:55 foo
ln: failed to access 'bar/foo': Not a directory
The correct behavior should be:
> rm foo bar ; touch foo bar && ls -ld foo bar && ln -f foo bar ; ls -ld foo bar
rm: cannot remove 'foo': No such file or directory
rm: cannot remove 'bar': No such file or directory
-rw-rw-r-- 1 bowman sysstaff 0 Mar 15 15:57 bar
-rw-rw-r-- 1 bowman sysstaff 0 Mar 15 15:57 foo
-rw-rw-r-- 2 bowman sysstaff 0 Mar 15 15:57 bar
-rw-rw-r-- 2 bowman sysstaff 0 Mar 15 15:57 foo
The same problem may be responsible for this failure in today's
build of gawk-4.2.64:
make[2]: Entering directory '/local/build/cc/gawk-4.2.64/awklib'
rm -f pwcat.c
ln -s ./eg/lib/pwcat.c .
ln: failed to create symbolic link '.': Invalid argument
When I reset PATH to have /bin in front, the ln command succeeded.
-------------------------------------------------------------------------------
- Nelson H. F. Beebe Tel: +1 801 581 5254 -
- University of Utah FAX: +1 801 581 4148 -
- Department of Mathematics, 110 LCB Internet e-mail: address@hidden -
- 155 S 1400 E RM 233 address@hidden address@hidden -
- Salt Lake City, UT 84112-0090, USA URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#34876: [bug-coreutils] ln 8.31 on Solaris 10 is partially broken |
Date: |
Sat, 16 Mar 2019 11:27:10 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 |
Nelson H. F. Beebe wrote:
touch foo bar && ls -ld foo bar && ln -f foo bar
...
-rw-rw-r-- 1 bowman sysstaff 0 Mar 15 15:55 bar
-rw-rw-r-- 1 bowman sysstaff 0 Mar 15 15:55 foo
ln: failed to access 'bar/foo': Not a directory
Thanks for reporting that. It's a serious error on Solaris 10, or on any
platform lacking support for the O_DIRECTORY flag standardized in POSIX.1-2008.
I installed the attached patch. We should probably generate a new coreutils
release soon.
0001-ln-port-to-platforms-lacking-O_DIRECTORY.patch
Description: Text Data
--- End Message ---