GNU bug report logs - #14116
[PATCH] ln: allow to overwrite relative symlink

Previous Next

Package: coreutils;

Reported by: Rémy Lefevre <lefevreremy <at> gmail.com>

Date: Mon, 1 Apr 2013 15:18:02 UTC

Severity: normal

Tags: patch

Merged with 17126, 23564

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


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

From: Pádraig Brady <P <at> draigBrady.com>
To: Florian Schweiger <florian.schweiger <at> bbc.co.uk>, 23564 <at> debbugs.gnu.org
Subject: Re: bug#23564: Unexpected results from `ln --symbolic --interactive
 --relative`
Date: Tue, 17 May 2016 17:10:34 +0100
unarchive 14116
forcemerge 14116 17126 23564
close 23564
stop

On 17/05/16 10:56, Florian Schweiger wrote:
> Hi,
>
> I've noticed the following unexpected behaviour in `ln` which appears to
> be a bug. I'm referring to the attached MWE Bash script
> test_ln-symbolic-interactive-relative.sh.
>
> When run, it creates a directory "test_dir" and a file "test_file" in
> the current working directory. Then it tries to create a relative,
> symbolic link to the file in said directory. When the "--interactive"
> option is present, this operation fails every other time in that it
> overwrites the existing link with an unreachable target.
>
> DETAILED DESCRIPTION:
>
> * First invocation
>       $ ./test_ln-symbolic-interactive-relative.sh
>       ln -sirv test_file test_dir/test_link
>       ‘test_dir/test_link’ -> ‘../test_file’
> * Second invocation:
>       $ ./test_ln-symbolic-interactive-relative.sh
>       ln -sirv test_file test_dir/test_link
>       ln: replace ‘test_dir/test_link’? y
>       ‘test_dir/test_link’ -> ‘test_file’
> * Third invocation:
>       $ ./test_ln-symbolic-interactive-relative.sh
>       ln -sirv test_file test_dir/test_link
>       ln: replace ‘test_dir/test_link’? y
>       ‘test_dir/test_link’ -> ‘../test_file’
>
>
> AFFECTED SYSTEM:
>       * ln (GNU coreutils) 8.21
>       * GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)
>       * Ubuntu 14.04.4 LTS

This was fixed in V8.22 with:
http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=v8.21-27-ge52293a

thanks,
Pádraig




This bug report was last modified 9 years and 10 days ago.

Previous Next


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