[MacPorts] #44110: coreutils @8.22_0 - ln fails to create symbolic links if source and target differ in character case only (and creates hidden hardlinks instead)
#44110: coreutils @8.22_0 - ln fails to create symbolic links if source and target differ in character case only (and creates hidden hardlinks instead) -------------------------+-------------------------------- Reporter: scubi@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.0 Keywords: ln, symlink | Port: coreutils -------------------------+-------------------------------- `/opt/local/libexec/gnubin/ln` fails to create a symbolic link if the name of the target and the directory differ only in character case. In that case a symbolic link is created below the source directory and you end up with a **hidden** hardlink if the newly created symlink is deleted! The behavior can be reproduced by following these steps: * create a directory `Foo` and try to create a symbolic link to that directory called `foo` * delete the wrongly placed symlink `Foo/foo` * list the directory `Foo` was created in * list the content of `Foo` as well as `foo` !!!!!!!! * list the inodes of `Foo` and the **hidden** `foo` {{{ indigo:gnu-ln-test scubi$ ls -al insgesamt 0 drwxr-xr-x 2 scubi staff 68 22. Jun 15:07 . drwxr-xr-x+ 36 scubi staff 1224 22. Jun 14:51 .. indigo:gnu-ln-test scubi$ mkdir Foo indigo:gnu-ln-test scubi$ ls -al insgesamt 0 drwxr-xr-x 3 scubi staff 102 22. Jun 15:12 . drwxr-xr-x+ 36 scubi staff 1224 22. Jun 14:51 .. drwxr-xr-x 2 scubi staff 68 22. Jun 15:12 Foo indigo:gnu-ln-test scubi$ ln -s Foo/ foo indigo:gnu-ln-test scubi$ ls -al insgesamt 0 drwxr-xr-x 3 scubi staff 102 22. Jun 15:12 . drwxr-xr-x+ 36 scubi staff 1224 22. Jun 14:51 .. drwxr-xr-x 3 scubi staff 102 22. Jun 15:13 Foo indigo:gnu-ln-test scubi$ ls -al Foo/ insgesamt 4 drwxr-xr-x 3 scubi staff 102 22. Jun 15:13 . drwxr-xr-x 3 scubi staff 102 22. Jun 15:12 .. lrwxr-xr-x 1 scubi staff 4 22. Jun 15:13 Foo -> Foo/ indigo:gnu-ln-test scubi$ rm Foo/Foo indigo:gnu-ln-test scubi$ ls -al Foo/ insgesamt 0 drwxr-xr-x 2 scubi staff 68 22. Jun 15:13 . drwxr-xr-x 3 scubi staff 102 22. Jun 15:12 .. indigo:gnu-ln-test scubi$ ls -al insgesamt 0 drwxr-xr-x 3 scubi staff 102 22. Jun 15:12 . drwxr-xr-x+ 36 scubi staff 1224 22. Jun 14:51 .. drwxr-xr-x 2 scubi staff 68 22. Jun 15:13 Foo indigo:gnu-ln-test scubi$ ls -al Foo foo Foo: insgesamt 0 drwxr-xr-x 2 scubi staff 68 22. Jun 15:13 . drwxr-xr-x 3 scubi staff 102 22. Jun 15:12 .. foo: insgesamt 0 drwxr-xr-x 2 scubi staff 68 22. Jun 15:13 . drwxr-xr-x 3 scubi staff 102 22. Jun 15:12 .. indigo:gnu-ln-test scubi$ ls -ldi Foo/ foo 2028539 drwxr-xr-x 2 scubi staff 68 22. Jun 15:13 Foo/ 2028539 drwxr-xr-x 2 scubi staff 68 22. Jun 15:13 foo indigo:gnu-ln-test scubi$ }}} Due to the fact that this sounds unbelievable - I also attached a screenshot :) BTW: creating the symlink with a different name works as expected: {{{ indigo:gnu-ln-test scubi$ ln -s Foo/ boo indigo:gnu-ln-test scubi$ ls -al insgesamt 4 drwxr-xr-x 4 scubi staff 136 22. Jun 15:25 . drwxr-xr-x+ 36 scubi staff 1224 22. Jun 14:51 .. drwxr-xr-x 2 scubi staff 68 22. Jun 15:13 Foo lrwxr-xr-x 1 scubi staff 4 22. Jun 15:25 boo -> Foo/ indigo:gnu-ln-test scubi$ }}} -- Ticket URL: <https://trac.macports.org/ticket/44110> MacPorts <http://www.macports.org/> Ports system for OS X
#44110: coreutils @8.22_0 - ln fails to create symbolic links if source and target differ in character case only (and creates hidden hardlinks instead) ------------------------+-------------------------------- Reporter: scubi@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.0 Resolution: | Keywords: Port: coreutils | ------------------------+-------------------------------- Changes (by mf2k@…): * keywords: ln, symlink => -- Ticket URL: <https://trac.macports.org/ticket/44110#comment:1> MacPorts <http://www.macports.org/> Ports system for OS X
#44110: coreutils @8.22_0 - ln fails to create symbolic links if source and target differ in character case only (and creates hidden hardlinks instead) ------------------------+-------------------------------- Reporter: scubi@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.0 Resolution: | Keywords: Port: coreutils | ------------------------+-------------------------------- Comment (by cal@…): That's just the way the OS X filesystem behaves in its case-insensitive mode. Try `ls -ldi /Users /users`. This isn't caused by the symlink at all. -- Ticket URL: <https://trac.macports.org/ticket/44110#comment:2> MacPorts <http://www.macports.org/> Ports system for OS X
#44110: coreutils @8.22_0 - ln fails to create symbolic links if source and target differ in character case only (and creates hidden hardlinks instead) ------------------------+-------------------------------- Reporter: scubi@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.0 Resolution: | Keywords: Port: coreutils | ------------------------+-------------------------------- Comment (by scubi@…): Thank you for the prompt answer. And sorry for that - it's my first Mac and I was just not aware of that semi-case-sensitive file handling. -- Ticket URL: <https://trac.macports.org/ticket/44110#comment:3> MacPorts <http://www.macports.org/> Ports system for OS X
#44110: coreutils @8.22_0 - ln fails to create symbolic links if source and target differ in character case only (and creates hidden hardlinks instead) ------------------------+-------------------------------- Reporter: scubi@… | Owner: macports-tickets@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.3.0 Resolution: wontfix | Keywords: Port: coreutils | ------------------------+-------------------------------- Changes (by cal@…): * status: new => closed * resolution: => wontfix Comment: I'd resolve this as `invalid`, but then again I agree this is very weird, so it's going to be `wontfix`, because this isn't our bug to fix. I hope Apple will someday switch to a better file system and avoid this weirdness. -- Ticket URL: <https://trac.macports.org/ticket/44110#comment:4> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts