GNU bug report logs - #21290
ln --relative bug?

Previous Next

Package: coreutils;

Reported by: Matteo Cerutti <matteo.cerutti <at> hotmail.co.uk>

Date: Tue, 18 Aug 2015 15:32:01 UTC

Severity: normal

Tags: notabug

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 21290 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Matteo Cerutti <matteo.cerutti <at> hotmail.co.uk>, 21290 <at> debbugs.gnu.org
Subject: Re: bug#21290: ln --relative bug?
Date: Tue, 18 Aug 2015 13:17:25 -0700
tag 21290 notabug
close 21290
stop

On 18/08/15 04:04, Matteo Cerutti wrote:
> Hi,
> 
> is this the expected behavior?
> 
>     # ln -s /tmp/non_existent_file b
>     # ln -s --relative b c
>     # ls -lrth
>     total 0
>     lrwxrwxrwx. 1 root root 22 Aug 18 13:03 b -> /tmp/non_existent_file
>     lrwxrwxrwx. 1 root root 20 Aug 18 13:03 c -> ../non_existent_file
>     #
> 
> 
> shouldn't c point to b?
> 
> Mind that it doesn't happen when the --relative option is absent.

Are you referring to the non_existent_file
or the fact that the symlink is dereferenced before the relative adjustment?
If the latter then that's expected as detailed at:

  http://www.gnu.org/software/coreutils/ln

Also included there is an example using `realpath`
which gives more control over the dereferencing.

thanks,
Pádraig.
> 
> Cheers,
> Matteo





This bug report was last modified 6 years and 272 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.