From debbugs-submit-bounces@debbugs.gnu.org Tue May 17 11:33:21 2016 Received: (at submit) by debbugs.gnu.org; 17 May 2016 15:33:21 +0000 Received: from localhost ([127.0.0.1]:56128 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b2gzp-0007PP-4i for submit@debbugs.gnu.org; Tue, 17 May 2016 11:33:21 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55728) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b2bjm-00063A-2i for submit@debbugs.gnu.org; Tue, 17 May 2016 05:56:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2bjf-00066y-QJ for submit@debbugs.gnu.org; Tue, 17 May 2016 05:56:20 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:58977) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2bjf-00066r-NS for submit@debbugs.gnu.org; Tue, 17 May 2016 05:56:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46677) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2bjd-0001oN-D0 for bug-coreutils@gnu.org; Tue, 17 May 2016 05:56:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2bjX-00065v-Va for bug-coreutils@gnu.org; Tue, 17 May 2016 05:56:15 -0400 Received: from mailout0.cwwtf.bbc.co.uk ([132.185.160.179]:42844) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2bjX-000655-LY for bug-coreutils@gnu.org; Tue, 17 May 2016 05:56:11 -0400 Received: from BGB01XI1003.national.core.bbc.co.uk ([10.184.50.53]) by mailout0.cwwtf.bbc.co.uk (8.15.2/8.14.3) with ESMTP id u4H9u6Uw003961 for ; Tue, 17 May 2016 10:56:06 +0100 (BST) Received: from [0.0.0.0] (132.185.134.10) by BGB01XI1003.national.core.bbc.co.uk (10.184.50.53) with Microsoft SMTP Server id 14.3.195.1; Tue, 17 May 2016 10:56:06 +0100 To: From: Florian Schweiger Subject: Unexpected results from `ln --symbolic --interactive --relative` Organization: BBC Research & Development Message-ID: <573AEAB6.7090608@bbc.co.uk> Date: Tue, 17 May 2016 10:56:06 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------080705090604020603030303" X-EXCLAIMER-MD-CONFIG: c91d45b2-6e10-4209-9543-d9970fac71b7 X-EXCLAIMER-MD-CONFIG: 1cd3ac1c-62e5-43f2-8404-6b688271c769 X-TM-AS-Product-Ver: SMEX-11.0.0.4179-8.000.1202-22326.006 X-TM-AS-Result: No--18.212300-0.000000-31 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.4 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 17 May 2016 11:33:19 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.4 (----) --------------080705090604020603030303 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: quoted-printable =EF=BB=BFHi, I've noticed the following unexpected behaviour in `ln` which appears to=20 be a bug. I'm referring to the attached MWE Bash script=20 test_ln-symbolic-interactive-relative.sh. When run, it creates a directory "test_dir" and a file "test_file" in=20 the current working directory. Then it tries to create a relative,=20 symbolic link to the file in said directory. When the "--interactive"=20 option is present, this operation fails every other time in that it=20 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 =E2=80=98test_dir/test_link=E2=80=99 -> =E2=80=98../test_file=E2=80=99 * Second invocation: $ ./test_ln-symbolic-interactive-relative.sh ln -sirv test_file test_dir/test_link ln: replace =E2=80=98test_dir/test_link=E2=80=99? y =E2=80=98test_dir/test_link=E2=80=99 -> =E2=80=98test_file=E2=80=99 * Third invocation: $ ./test_ln-symbolic-interactive-relative.sh ln -sirv test_file test_dir/test_link ln: replace =E2=80=98test_dir/test_link=E2=80=99? y =E2=80=98test_dir/test_link=E2=80=99 -> =E2=80=98../test_file=E2=80=99 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 * Linux 3.13.0-67-generic #110-Ubuntu SMP Fri Oct 23 13:24:41 UTC=20 2015 x86_64 x86_64 x86_64 GNU/Linux On other systems, the symbolic link is set as expected every time. WORKING SETUP: * ln (GNU coreutils) 8.21 * GNU bash, version 4.2.53(1)-release (x86_64-suse-linux-gnu) * openSUSE 13.1 (Bottle) (x86_64) * Linux 3.11.10-29-desktop #1 SMP PREEMPT Thu Mar 5 16:24:00 UTC=20 2015 (338c513) x86_64 x86_64 x86_64 GNU/Linux Cheers, Florian ----------------------------- http://www.bbc.co.uk This e-mail (and any attachments) is confidential and=20 may contain personal views which are not the views of the BBC unless specif= ically stated. If you have received it in=20 error, please delete it from your system. Do not use, copy or disclose the=20 information in any way nor act in reliance on it and notify the sender=20 immediately. Please note that the BBC monitors e-mails=20 sent or received. Further communication will signify your consent to=20 this. -----------------------------= --------------080705090604020603030303 Content-Type: application/gzip; name="test_ln-symbolic-interactive-relative.tar.gz" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="test_ln-symbolic-interactive-relative.tar.gz" H4sIADbmOlcAA+3S0WrDIBTG8Vz7FJZduxhDmscpSWqJ1JqhJrC3X21huxoUCh2D/+/mHI4f eBCzTfngg0qfl3HxblIuZBuHKbvNqmj9UJr3NFdP0Fd915Vq2q4ttek7fZsXpjFVY/pm3+1b Xc6N1m1fSf3MpY9aUx6ilNXJL9ENIf2Wi8dXbPNyb7t6TbEeXaht2OQ4pFmIvKzTLHP5Gifn rbicjy5K9XEfXXsh7DQv0gepkovbT/Q7Ud8a78JZPJYSf/0SAAAAAAAAAAAAAAAAAPC/fAGL XMe6ACgAAA== --------------080705090604020603030303-- From debbugs-submit-bounces@debbugs.gnu.org Tue May 17 12:10:39 2016 Received: (at 23564) by debbugs.gnu.org; 17 May 2016 16:10:39 +0000 Received: from localhost ([127.0.0.1]:56159 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b2hZv-0008ON-Iz for submit@debbugs.gnu.org; Tue, 17 May 2016 12:10:39 -0400 Received: from mail.magicbluesmoke.com ([82.195.144.49]:55784) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b2hZt-0008OB-57; Tue, 17 May 2016 12:10:38 -0400 Received: from [192.168.1.80] (unknown [109.76.84.235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.magicbluesmoke.com (Postfix) with ESMTPSA id 7CDB24A9D; Tue, 17 May 2016 17:10:35 +0100 (IST) Subject: Re: bug#23564: Unexpected results from `ln --symbolic --interactive --relative` To: Florian Schweiger , 23564@debbugs.gnu.org References: <573AEAB6.7090608@bbc.co.uk> From: =?UTF-8?Q?P=c3=a1draig_Brady?= Message-ID: <573B427A.9000702@draigBrady.com> Date: Tue, 17 May 2016 17:10:34 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <573AEAB6.7090608@bbc.co.uk> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 23564 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) 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 From unknown Mon Jun 23 13:14:10 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 15 Jun 2016 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator