Public bug reported:

in ubuntu14, the behavior of "ln --relative" seems to be quite broken.
on ubuntu 16 it works as expected.  can we please backport whatever fix
from u16 or update coreutils? 8.15 is where they started including the
'realpath' binary, maybe they fixed "ln --relative" too.

u14 INCORRECT:

$ loop=0; nloops=4; base=/tmp/lntest; rm -rf $base/ && mkdir -p $base/dir &&
touch $base/dir/file && while ((loop++ < nloops)); do ln -frs $base/dir/file 
$base/link; readlink -f $base/link; sleep 1; done
/tmp/lntest/dir/file
/tmp/lntest/file
/tmp/lntest/dir/file
/tmp/lntest/file

u16 CORRECT:

$ loop=0; nloops=4; base=/tmp/lntest; rm -rf $base/ && mkdir -p $base/dir &&
touch $base/dir/file && while ((loop++ < nloops)); do ln -frs $base/dir/file 
$base/link; readlink -f $base/link; sleep 1; done
/tmp/lntest/dir/file
/tmp/lntest/dir/file
/tmp/lntest/dir/file
/tmp/lntest/dir/file

** Affects: coreutils (Ubuntu)
     Importance: Undecided
         Status: New

** Description changed:

  in ubuntu14, the behavior of "ln --relative" seems to be quite broken.
  on ubuntu 16 it works as expected.  can we please backport whatever fix
  from u16 or update coreutils? 8.15 is where they started including the
  'realpath' binary, maybe they fixed "ln --relative" too.
  
  u14 INCORRECT:
  
- $ loop=0; nloops=4; base=/tmp/lntest; rm -rf $base/ && mkdir -p $base/dir && 
touch $base/dir/file && while ((loop++ < nloops)); do ln <-frs $base/dir/file 
$base/link; readlink -f $base/link; sleep 1; done
+ $ loop=0; nloops=4; base=/tmp/lntest; rm -rf $base/ && mkdir -p $base/dir &&
+ touch $base/dir/file && while ((loop++ < nloops)); do ln -frs $base/dir/file 
$base/link; readlink -f $base/link; sleep 1; done
  /tmp/lntest/dir/file
  /tmp/lntest/file
  /tmp/lntest/dir/file
  /tmp/lntest/file
  
  u16 CORRECT:
  
- $ loop=0; nloops=4; base=/tmp/lntest; rm -rf $base/ && mkdir -p $base/dir && 
touch $base/dir/file && while ((loop++ < nloops)); do ln <-frs $base/dir/file 
$base/link; readlink -f $base/link; sleep 1; done
+ $ loop=0; nloops=4; base=/tmp/lntest; rm -rf $base/ && mkdir -p $base/dir &&
+ touch $base/dir/file && while ((loop++ < nloops)); do ln -frs $base/dir/file 
$base/link; readlink -f $base/link; sleep 1; done
  /tmp/lntest/dir/file
  /tmp/lntest/dir/file
  /tmp/lntest/dir/file
  /tmp/lntest/dir/file

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1715753

Title:
  ln --relative broken on u14, works on u16

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/1715753/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to