GNU bug report logs - #32127
ln: add option to fall-back to softlink if hardlink fails

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: coreutils; Severity: wishlist; Reported by: L A Walsh <coreutils@HIDDEN>; dated Wed, 11 Jul 2018 19:30:02 UTC; Maintainer for coreutils is bug-coreutils@HIDDEN.
Changed bug title to 'ln: add option to fall-back to softlink if hardlink fails' from 'RFE -- in the way "cp -rl" -- enable 'ln' to do likewise?' Request was from Assaf Gordon <assafgordon@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Severity set to 'wishlist' from 'normal' Request was from Assaf Gordon <assafgordon@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 19 Jul 2018 04:22:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 19 00:22:37 2018
Received: from localhost ([127.0.0.1]:47407 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fg0Sb-0006mi-2p
	for submit <at> debbugs.gnu.org; Thu, 19 Jul 2018 00:22:37 -0400
Received: from eggs.gnu.org ([208.118.235.92]:60149)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <coreutils@HIDDEN>) id 1fg0SZ-0006mU-E3
 for submit <at> debbugs.gnu.org; Thu, 19 Jul 2018 00:22:35 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <coreutils@HIDDEN>) id 1fg0ST-0001uL-Hp
 for submit <at> debbugs.gnu.org; Thu, 19 Jul 2018 00:22:30 -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.0 required=5.0 tests=BAYES_40 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:38991)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <coreutils@HIDDEN>) id 1fg0ST-0001u4-Di
 for submit <at> debbugs.gnu.org; Thu, 19 Jul 2018 00:22:29 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:51103)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <coreutils@HIDDEN>) id 1fg0SS-00040C-F1
 for bug-coreutils@HIDDEN; Thu, 19 Jul 2018 00:22:29 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <coreutils@HIDDEN>) id 1fg0SP-0001pK-AN
 for bug-coreutils@HIDDEN; Thu, 19 Jul 2018 00:22:28 -0400
Received: from ishtar.tlinx.org ([173.164.175.65]:37690
 helo=Ishtar.sc.tlinx.org)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <coreutils@HIDDEN>)
 id 1fg0SO-0001mx-Vu; Thu, 19 Jul 2018 00:22:25 -0400
Received: from [192.168.3.12] (Athenae [192.168.3.12])
 by Ishtar.sc.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id
 w6J4MLh9051964; Wed, 18 Jul 2018 21:22:23 -0700
Message-ID: <5B5011FD.70303@HIDDEN>
Date: Wed, 18 Jul 2018 21:22:21 -0700
From: L A Walsh <coreutils@HIDDEN>
User-Agent: Thunderbird
MIME-Version: 1.0
To: coreutils@HIDDEN, Coreutils <bug-coreutils@HIDDEN>
Subject: Re: bug#32127: RFE -- in the way "cp -rl" -- enable 'ln' to
 do	likewise?
References: <a8b9d013-8886-5b8a-741b-50219255f94a@HIDDEN>	<5B470062.8070909@HIDDEN>	<9fad6da1-9ca5-a3ce-fe32-0cc27e10b879@HIDDEN>	<5B4A381A.8040708@HIDDEN>	<bbaa9e90-f896-c4a4-2f96-eb2b0556c73b@HIDDEN>	<5B4DA817.6080407@HIDDEN>	<9b5414ce-89be-11e8-9b6a-00163eeb5320@HIDDEN>	<5B4E5C62.8020701@HIDDEN>	<001a0e9c-8a2b-11e8-9b6a-00163eeb5320@HIDDEN>	<5B4F153F.1010808@HIDDEN>
 <d4f7e8b4-8a94-11e8-9b6a-00163eeb5320@HIDDEN>
In-Reply-To: <d4f7e8b4-8a94-11e8-9b6a-00163eeb5320@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no
 timestamps) [generic] [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)



Michael Stone wrote:


> Or, they expect the traditional behavior, which is that requesting a
> link which can't be created will result in failure. You seem to 
> completely disregard the possibility that any script written in 40 years 
> might use that behavior in its logic, while I find it extremely unlikely 
> that scripts would be written in the hope that someday the behavior 
> might change and things work differently because they make more sense 
> that way.
 ---
	Like I said....putting change into the kernel to do the same --
seems to fly by with little or no comment...  Putting it in an app
where it is visible...and everyone complains.  Interesting.

Apps that rely on getting errors?  You don't regard that as a bit
of an unreliable design?  But easily solved -- go the way of 'ls'
and only create the symlinks if the process is interactive.

Problem solved






Information forwarded to bug-coreutils@HIDDEN:
bug#32127; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 18 Jul 2018 22:16:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 18 18:16:03 2018
Received: from localhost ([127.0.0.1]:47261 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ffujq-0000ch-NK
	for submit <at> debbugs.gnu.org; Wed, 18 Jul 2018 18:16:02 -0400
Received: from eggs.gnu.org ([208.118.235.92]:59421)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <coreutils@HIDDEN>) id 1ffujp-0000cC-1n
 for submit <at> debbugs.gnu.org; Wed, 18 Jul 2018 18:16:01 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <coreutils@HIDDEN>) id 1ffuji-0005JY-6F
 for submit <at> debbugs.gnu.org; Wed, 18 Jul 2018 18:15:55 -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]:39407)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <coreutils@HIDDEN>) id 1ffuji-0005JM-1y
 for submit <at> debbugs.gnu.org; Wed, 18 Jul 2018 18:15:54 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:50359)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <coreutils@HIDDEN>) id 1ffujg-00008a-Sf
 for bug-coreutils@HIDDEN; Wed, 18 Jul 2018 18:15:53 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <coreutils@HIDDEN>) id 1ffujd-0005HO-Nv
 for bug-coreutils@HIDDEN; Wed, 18 Jul 2018 18:15:52 -0400
Received: from ishtar.tlinx.org ([173.164.175.65]:40126
 helo=Ishtar.sc.tlinx.org)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <coreutils@HIDDEN>)
 id 1ffujd-0005GK-Fb; Wed, 18 Jul 2018 18:15:49 -0400
Received: from [192.168.3.12] (Athenae [192.168.3.12])
 by Ishtar.sc.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id
 w6IMFiPF028772; Wed, 18 Jul 2018 15:15:46 -0700
Message-ID: <5B4FBC10.9060409@HIDDEN>
Date: Wed, 18 Jul 2018 15:15:44 -0700
From: L A Walsh <coreutils@HIDDEN>
User-Agent: Thunderbird
MIME-Version: 1.0
To: Mike Hodson <mystica@HIDDEN>
Subject: Re: bug#32127: RFE -- in the way "cp -rl" -- enable 'ln' to do
 likewise?
References: <5B465A80.8030104@HIDDEN>
 <a8b9d013-8886-5b8a-741b-50219255f94a@HIDDEN>
 <5B470062.8070909@HIDDEN>
 <9fad6da1-9ca5-a3ce-fe32-0cc27e10b879@HIDDEN>
 <5B4A381A.8040708@HIDDEN>
 <bbaa9e90-f896-c4a4-2f96-eb2b0556c73b@HIDDEN>
 <5B4DA817.6080407@HIDDEN>
 <9b5414ce-89be-11e8-9b6a-00163eeb5320@HIDDEN>
 <5B4E5C62.8020701@HIDDEN>
 <001a0e9c-8a2b-11e8-9b6a-00163eeb5320@HIDDEN>
 <5B4F153F.1010808@HIDDEN>
 <CAN++4hEYP75k1xYxRuLy_hEUZ9eTr69nX2L4U+meRn3g3jmQmQ@HIDDEN>
In-Reply-To: <CAN++4hEYP75k1xYxRuLy_hEUZ9eTr69nX2L4U+meRn3g3jmQmQ@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no
 timestamps) [generic] [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
Cc: bug-coreutils@HIDDEN, Coreutils <coreutils@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)



Mike Hodson wrote:

> I wager that some people *aren't* aware that you cannot hardlink a dire=
ctory=20
----
	If they don't know why, they probably don't know the difference
between hard and soft links to files -- and will *then* be annoyed that
linking doesn't work.  *THEN*, they will your "hundreds of NEW=20
bug reports 'linking broken' 'why can't I link a directory' -- all becaus=
e
ln creates no link nor gives an explanation. =20

My suggestion does both -- create a link that they obviously wanted,=20
of the only type that works (as no link type was specified(**) ), AND war=
n
that "A symlink was created, as hard-linking to a directory is
not supported".

(**) - if they go so far as to use '-P'/'--physical', then I would sugges=
t
NOT creating the symlink.=20

That addresses the issue of people filing 100's of new bug reports
as it tells them why -- it's not supported.

The message "hard link not allowed for directory" is also inaccurate.
It says hard linking is not "allowed" (permitted), suggesting it could
be.  Saying 'not supported' says nothing about permissions.


> Look at the YEARS of new users being introduced, as their distributions=
=20
> finally 'stabilize' newer coreutils, to the new "Quoted Filenames" in=20
> 'ls' . So many people have been totally confused, angry, and rather=20
> taken aback that such an old utility did something different.
---
	Because someone chose to *add* quotes by default when there
was already an option to add them.  They changed the default on a
personal whim.  It's not the case that without quotes nothing will
work.  It was an *arbitrary* choice for change among several choices
that were already present.


=20
> Even when it could be argued(and I said exactly this when I saw the new=
=20
> feature)  "Hey, thats pretty cool, i can cut and paste with a mouse now=
=20
> and it won't require manual editing later"
---

	Sigh...untrue.  Maybe someone new who hadn't developed a workflow
to handle such input would like it.  Anyone who had been around "a while"=

would have developed a workaround, *if* it bothered them.  That workflow
broke with the new change:

> /bin/ls -1
<output> 	# that I Copy+Paste as such:
readarray -t files
<paste>
^D
## now my filenames w/spaces in them or whatever, are in 'files'
# now try to use the files like 'ls "${x[@]}"'
> ls "${x[@]}"
ls: cannot access "'Anime/D. Gray-man'": No such file or directory
ls: cannot access ' Anime/DGreyMan-=E3=80=8C=E3=83=87=E3=82=A3=E3=83=BC=E3=
=83=BB=E3=82=B0=E3=83=AC=E3=82=A4=E3=83=9E=E3=83=B3=E3=80=8D=E3=82=AA=E3=83=
=AA=E3=82=B8=E3=83=8A=E3=83=AB=E3=83=BB=E3=82=B5=E3=82=A6=E3=83=B3=E3=83=89=
=E3=83=88=E3=83=A9=E3=83=83=E3=82=AF=E3=80=80=EF=BC=92': No such file or =
directory
ls: cannot access "'Anime/Daphne In The Brilliant Blue'": No such file or=
 directory
ls: cannot access "'Anime/Darling in the FranXX'": No such file or direct=
ory
ls: cannot access "'Anime/Devil Survivor 2 - The Animation OST'": No such=
 file or directory
ls: cannot access "'Anime/Dragonaut - The Resonance OST'": No such file o=
r directory

----

	Total SNAFU.


> many other people have made the argument of "if its not=20
> in an interactive terminal, NOTHING CHANGED" because so many thought=20
> that "well crap I can't rely on any scripts to work anymore" \
---
	If I never ran interactively, I wouldn't have noticed (nor
would I already have a workaround). =20

	So it was 1) arbitrary, 2) already had an option to do=20
it (could have been done w/aliases) and=20
3) it broke existing workflows =3D=3D>>  Bad Change.

	The proposed change, however fixes an error condition
as well as provides the workaround, automatically (with an
optional explanation).  The two cases are VERY different.

-l








Information forwarded to bug-coreutils@HIDDEN:
bug#32127; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 18 Jul 2018 15:28:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 18 11:28:16 2018
Received: from localhost ([127.0.0.1]:47102 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ffoNE-00080a-6P
	for submit <at> debbugs.gnu.org; Wed, 18 Jul 2018 11:28:16 -0400
Received: from eggs.gnu.org ([208.118.235.92]:58169)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <auerswal@HIDDEN>) id 1ffoNC-00080L-BR
 for submit <at> debbugs.gnu.org; Wed, 18 Jul 2018 11:28:14 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <auerswal@HIDDEN>) id 1ffoN5-0001ES-Tx
 for submit <at> debbugs.gnu.org; Wed, 18 Jul 2018 11:28:09 -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]:41165)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <auerswal@HIDDEN>)
 id 1ffoN5-0001EH-QA
 for submit <at> debbugs.gnu.org; Wed, 18 Jul 2018 11:28:07 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:49119)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <auerswal@HIDDEN>) id 1ffoN4-0002iS-HJ
 for bug-coreutils@HIDDEN; Wed, 18 Jul 2018 11:28:07 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <auerswal@HIDDEN>) id 1ffoN3-0001D0-Fs
 for bug-coreutils@HIDDEN; Wed, 18 Jul 2018 11:28:06 -0400
Received: from mailgw1.uni-kl.de ([2001:638:208:120::220]:44051)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <auerswal@HIDDEN>)
 id 1ffoN3-00015J-8B; Wed, 18 Jul 2018 11:28:05 -0400
Received: from sushi.unix-ag.uni-kl.de (sushi.unix-ag.uni-kl.de
 [IPv6:2001:638:208:ef34:0:ff:fe00:65])
 by mailgw1.uni-kl.de (8.14.4/8.14.4/Debian-8+deb8u2) with ESMTP id
 w6IFRgd3003851
 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT);
 Wed, 18 Jul 2018 17:27:43 +0200
Received: from sushi.unix-ag.uni-kl.de (ip6-localhost [IPv6:::1])
 by sushi.unix-ag.uni-kl.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id
 w6IFRs9m006341
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO);
 Wed, 18 Jul 2018 17:27:54 +0200
Received: (from auerswal@localhost)
 by sushi.unix-ag.uni-kl.de (8.14.4/8.14.4/Submit) id w6IFRsaA006340;
 Wed, 18 Jul 2018 17:27:54 +0200
Date: Wed, 18 Jul 2018 17:27:54 +0200
From: Erik Auerswald <auerswal@HIDDEN>
To: coreutils@HIDDEN, bug-coreutils@HIDDEN
Subject: Re: bug#32127: RFE -- in the way "cp -rl" -- enable 'ln' to do
 likewise?
Message-ID: <20180718152754.GA5955@HIDDEN>
Mail-Followup-To: Erik Auerswald <auerswal@HIDDEN>,
 coreutils@HIDDEN, bug-coreutils@HIDDEN
References: <5B470062.8070909@HIDDEN>
 <9fad6da1-9ca5-a3ce-fe32-0cc27e10b879@HIDDEN>
 <5B4A381A.8040708@HIDDEN>
 <bbaa9e90-f896-c4a4-2f96-eb2b0556c73b@HIDDEN>
 <5B4DA817.6080407@HIDDEN>
 <9b5414ce-89be-11e8-9b6a-00163eeb5320@HIDDEN>
 <5B4E5C62.8020701@HIDDEN>
 <001a0e9c-8a2b-11e8-9b6a-00163eeb5320@HIDDEN>
 <5B4F153F.1010808@HIDDEN>
 <CAN++4hEYP75k1xYxRuLy_hEUZ9eTr69nX2L4U+meRn3g3jmQmQ@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <CAN++4hEYP75k1xYxRuLy_hEUZ9eTr69nX2L4U+meRn3g3jmQmQ@HIDDEN>
User-Agent: Mutt/1.5.21 (2010-09-15)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

Hi,

On Wed, Jul 18, 2018 at 04:36:44AM -0600, Mike Hodson wrote:
> On Wed, Jul 18, 2018 at 4:24 AM L A Walsh <coreutils@HIDDEN> wrote:
> 
> > In the case of creating a link to a directory there is
> > no choice in creating a "working solution".  If you want a link
> > there, it HAS to be a symlink.  That the user would bother to
> > use the 'ln' (link) command in the first place is a sufficiently
> > convincing "argument" that they really DID want a link there.

This sounds reasonalble to me: a link was requested, it might not matter
which kind, and only one kind of link can be created. Thus 'ln' could
try to do the right thing and create a (symbolic) link.

> > That they didn't explicitly specify the type should additionally
> > be taken that they didn't care enough to specify the type -- only
> > that the link be created.
> >
> >         I hope that clarifies that I'm not attempting to always
> > find some "automatic action", but saw that in this case, it
> > wouldn't be hard to figure out what was wanted and that doing
> > so wouldn't be hard to undo if it was not.
> 
> I wager that some people *aren't* aware that you cannot hardlink a
> directory, and instead of writing hundreds of NEW bug reports "linking
> broken" "why can't I link a directory" leaving 'ln' as it has been since
> the dawn of time is the better option.

Printing a helpful warning message that a symbolic link has been created
instead of a hard link, because a hard link cannot be created (perhaps
less verbose) would help at least a little bit. A new option that is
needed to enable that behavior would prevent the confused users, until
distributions start to add it to the default aliases.

> You don't think this will happen? I assure you it will.
> 
> Look at the YEARS of new users being introduced, as their distributions
> finally 'stabilize' newer coreutils, to the new "Quoted Filenames" in 'ls'
> . So many people have been totally confused, angry, and rather taken aback
> that such an old utility did something different.

I immediatly searched for the respective option and changed my aliases
to not quote 'ls' output. ;-)

I did not like that the default output of 'ls' was changed, but at least
I can disable this anti-feature.

> Let us all learn from history, on this same maillist, of when and when not
> to change the default workings of a 40 year old tool.

This sounds reasonable to me, but others have different view, see your
'ls' example. ;-)

Anyway, IMHO Linda's arguments for the specific change requested
have merit. I personally would prefer an option to enable that new
functionality instead of making it the default, if someone were to
implement said functionality.

Thanks,
Erik
-- 
Design your product to please the users.
                        -- Paul Graham




Information forwarded to bug-coreutils@HIDDEN:
bug#32127; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 18 Jul 2018 14:19:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 18 10:19:06 2018
Received: from localhost ([127.0.0.1]:47050 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ffnIH-0006GI-Og
	for submit <at> debbugs.gnu.org; Wed, 18 Jul 2018 10:19:05 -0400
Received: from eggs.gnu.org ([208.118.235.92]:35400)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mstone@HIDDEN>) id 1ffnIG-0006Fm-A4
 for submit <at> debbugs.gnu.org; Wed, 18 Jul 2018 10:19:04 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <mstone@HIDDEN>) id 1ffnIA-00078f-71
 for submit <at> debbugs.gnu.org; Wed, 18 Jul 2018 10:18:59 -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]:56944)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <mstone@HIDDEN>) id 1ffnIA-00078S-2U
 for submit <at> debbugs.gnu.org; Wed, 18 Jul 2018 10:18:58 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:54586)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <mstone@HIDDEN>) id 1ffnI8-0006dB-So
 for bug-coreutils@HIDDEN; Wed, 18 Jul 2018 10:18:57 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <mstone@HIDDEN>) id 1ffnI5-000776-NJ
 for bug-coreutils@HIDDEN; Wed, 18 Jul 2018 10:18:56 -0400
Received: from harad.mathom.us ([54.218.24.45]:60812)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <mstone@HIDDEN>)
 id 1ffnI5-00076X-Gj; Wed, 18 Jul 2018 10:18:53 -0400
Received: from osgiliath.mathom.us (osgiliath.mathom.us
 [IPv6:2001:470:e4c3:2341::2])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by harad.mathom.us (Postfix) with ESMTPSA id 2A9CC19A;
 Wed, 18 Jul 2018 14:18:50 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by osgiliath.mathom.us (Postfix) with ESMTP id 4F0616E66A;
 Wed, 18 Jul 2018 10:18:19 -0400 (EDT)
Received: from osgiliath.mathom.us ([127.0.0.1])
 by localhost (osgiliath.mathom.us [127.0.0.1]) (amavisd-new, port 10024)
 with LMTP id Wd_kEUftXJCe; Wed, 18 Jul 2018 10:18:19 -0400 (EDT)
Received: by osgiliath.mathom.us (Postfix, from userid 1000)
 id 33AFA6E87C; Wed, 18 Jul 2018 10:18:19 -0400 (EDT)
Date: Wed, 18 Jul 2018 10:18:19 -0400
From: Michael Stone <mstone@HIDDEN>
To: coreutils@HIDDEN, Coreutils <bug-coreutils@HIDDEN>
Subject: Re: bug#32127: RFE -- in the way "cp -rl" -- enable 'ln' to do
 likewise?
Message-ID: <d4f7e8b4-8a94-11e8-9b6a-00163eeb5320@HIDDEN>
Mail-Followup-To: coreutils@HIDDEN, Coreutils <bug-coreutils@HIDDEN>
References: <a8b9d013-8886-5b8a-741b-50219255f94a@HIDDEN>
 <5B470062.8070909@HIDDEN>
 <9fad6da1-9ca5-a3ce-fe32-0cc27e10b879@HIDDEN>
 <5B4A381A.8040708@HIDDEN>
 <bbaa9e90-f896-c4a4-2f96-eb2b0556c73b@HIDDEN>
 <5B4DA817.6080407@HIDDEN>
 <9b5414ce-89be-11e8-9b6a-00163eeb5320@HIDDEN>
 <5B4E5C62.8020701@HIDDEN>
 <001a0e9c-8a2b-11e8-9b6a-00163eeb5320@HIDDEN>
 <5B4F153F.1010808@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Disposition: inline
In-Reply-To: <5B4F153F.1010808@HIDDEN>
X-Pgp-Fingerprint: 02D5 315F F11F 1861 860E  1E02 F61A ACDC FA11 FFDE
User-Agent: NeoMutt/20170113 (1.7.2)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

On Wed, Jul 18, 2018 at 03:23:59AM -0700, L A Walsh wrote:
>	In the case of creating a link to a directory there is
>no choice in creating a "working solution".  If you want a link there, 
>it HAS to be a symlink.  That the user would bother to
>use the 'ln' (link) command in the first place is a sufficiently
>convincing "argument" that they really DID want a link there.
>That they didn't explicitly specify the type should additionally
>be taken that they didn't care enough to specify the type -- only
>that the link be created.

Or, they expect the traditional behavior, which is that requesting a
link which can't be created will result in failure. You seem to 
completely disregard the possibility that any script written in 40 years 
might use that behavior in its logic, while I find it extremely unlikely 
that scripts would be written in the hope that someday the behavior 
might change and things work differently because they make more sense 
that way.




Information forwarded to bug-coreutils@HIDDEN:
bug#32127; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 18 Jul 2018 10:37:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 18 06:37:12 2018
Received: from localhost ([127.0.0.1]:46170 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ffjpY-0007B4-D4
	for submit <at> debbugs.gnu.org; Wed, 18 Jul 2018 06:37:12 -0400
Received: from eggs.gnu.org ([208.118.235.92]:42525)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mystica@HIDDEN>) id 1ffjpW-0007Aq-7y
 for submit <at> debbugs.gnu.org; Wed, 18 Jul 2018 06:37:10 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <mystica@HIDDEN>) id 1ffjpP-0002Ej-9x
 for submit <at> debbugs.gnu.org; Wed, 18 Jul 2018 06:37:04 -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,FREEMAIL_FROM,
 HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:60197)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <mystica@HIDDEN>) id 1ffjpP-0002Ea-6Y
 for submit <at> debbugs.gnu.org; Wed, 18 Jul 2018 06:37:03 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:33483)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <mystica@HIDDEN>) id 1ffjpN-0000OB-SR
 for bug-coreutils@HIDDEN; Wed, 18 Jul 2018 06:37:03 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <mystica@HIDDEN>) id 1ffjpM-0002DH-JG
 for bug-coreutils@HIDDEN; Wed, 18 Jul 2018 06:37:01 -0400
Received: from mail-ua0-x236.google.com ([2607:f8b0:400c:c08::236]:34971)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <mystica@HIDDEN>)
 id 1ffjpJ-0002BF-IO; Wed, 18 Jul 2018 06:36:57 -0400
Received: by mail-ua0-x236.google.com with SMTP id q12-v6so2613582ual.2;
 Wed, 18 Jul 2018 03:36:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=9CF71hGJ3AHXwD6/u/z0PYacf2/esLm67sMVNUuxcvY=;
 b=oX40fKFAxnhyUxBwcdIn9vUf3zHcmxhGNY4xNO5qI/4Ft0h+NEGzooi/FWYAsJjnc6
 ++5Z4XA/RU4/OA4syVNm5kg1eD9C7C+gGw9RFwUIaVoXS/yDRVA5dJEAWSr7fjqHUFre
 bo9AX6DKCagtvniEe5ekRCw4kxCFEL17OwIHzDUVLILAi7bpZLSck3ftMoXDjMtrzCmq
 iXVabH6h/+EV9NGkpGRwwGGxD6zRSIcKc25/eEftJHfZKy0ISYFMGDu0HP+t2IXh9ifV
 10Doc+YmanQ2UcIBhwNx8Tz0Wg2eO6iIeqd9+O9/plIcAlEkjeIiw5Bn33wfF/KHTGdn
 SXsg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=9CF71hGJ3AHXwD6/u/z0PYacf2/esLm67sMVNUuxcvY=;
 b=t6/l/E101PdsrFWvAYVfh0Fh4yKa/Ef4sWHALsAra8gDQu5dYoZsGPVE29xrYKoTlL
 fDyPZgI5oeFEt1L2EWg/NSuovIdEy8BqfUWmJdbCRW8sltCvbX62NSlSLo3fXqVKhPFv
 cNN5pK2975hCKcytm2OXZCwcdL8llKXQ1ah3IizNsnQKjWtVi+HZkwt83TmKkHdxxZM5
 0ZV2wvMgxGeWzZ3xPQBjM9wr2eKfLRyiN5+u8qL4jgLJ/FLg6LN0GyAb2ihy5WuATaHn
 QmM/Xs8dzyT6uDcGPJjMfXe/picGMF0EgFCiQm3gqbUz418XsI60WlnEcwCsC2x2uYmQ
 Swug==
X-Gm-Message-State: AOUpUlHM+DbCqczrSUxLgTF+C/NJd2UgWQUXaTTVLaM6q/3o5eYeDPqw
 Ir1WoVop0QXekS0WzszJY9rDIxADCnlf4RDYtZQ=
X-Google-Smtp-Source: AAOMgpd4myxTUo7rcMu8rS2INDwh0YCOJS4ijTPTJ0Vgyu9k2uWh2RilDWO+u/MgBK7Tgws0g2PEylswGT8kz0Ou8Ck=
X-Received: by 2002:ab0:4ba7:: with SMTP id v39-v6mr3436440uaf.9.1531910216473; 
 Wed, 18 Jul 2018 03:36:56 -0700 (PDT)
MIME-Version: 1.0
References: <5B465A80.8030104@HIDDEN>
 <a8b9d013-8886-5b8a-741b-50219255f94a@HIDDEN>
 <5B470062.8070909@HIDDEN>
 <9fad6da1-9ca5-a3ce-fe32-0cc27e10b879@HIDDEN>
 <5B4A381A.8040708@HIDDEN>
 <bbaa9e90-f896-c4a4-2f96-eb2b0556c73b@HIDDEN>
 <5B4DA817.6080407@HIDDEN>
 <9b5414ce-89be-11e8-9b6a-00163eeb5320@HIDDEN>
 <5B4E5C62.8020701@HIDDEN>
 <001a0e9c-8a2b-11e8-9b6a-00163eeb5320@HIDDEN>
 <5B4F153F.1010808@HIDDEN>
In-Reply-To: <5B4F153F.1010808@HIDDEN>
From: Mike Hodson <mystica@HIDDEN>
Date: Wed, 18 Jul 2018 04:36:44 -0600
Message-ID: <CAN++4hEYP75k1xYxRuLy_hEUZ9eTr69nX2L4U+meRn3g3jmQmQ@HIDDEN>
Subject: Re: bug#32127: RFE -- in the way "cp -rl" -- enable 'ln' to do
 likewise?
To: coreutils@HIDDEN
Content-Type: multipart/alternative; boundary="00000000000047e197057143a49a"
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.0 (----)
X-Debbugs-Envelope-To: submit
Cc: bug-coreutils@HIDDEN, Coreutils <coreutils@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

--00000000000047e197057143a49a
Content-Type: text/plain; charset="UTF-8"

On Wed, Jul 18, 2018 at 4:24 AM L A Walsh <coreutils@HIDDEN> wrote:

> In the case of creating a link to a directory there is
> no choice in creating a "working solution".  If you want a link
> there, it HAS to be a symlink.  That the user would bother to
> use the 'ln' (link) command in the first place is a sufficiently
> convincing "argument" that they really DID want a link there.
> That they didn't explicitly specify the type should additionally
> be taken that they didn't care enough to specify the type -- only
> that the link be created.
>
>         I hope that clarifies that I'm not attempting to always
> find some "automatic action", but saw that in this case, it
> wouldn't be hard to figure out what was wanted and that doing
> so wouldn't be hard to undo if it was not.
>
>
>
I wager that some people *aren't* aware that you cannot hardlink a
directory, and instead of writing hundreds of NEW bug reports "linking
broken" "why can't I link a directory" leaving 'ln' as it has been since
the dawn of time is the better option.

You don't think this will happen? I assure you it will.

Look at the YEARS of new users being introduced, as their distributions
finally 'stabilize' newer coreutils, to the new "Quoted Filenames" in 'ls'
. So many people have been totally confused, angry, and rather taken aback
that such an old utility did something different.

Even when it could be argued(and I said exactly this when I saw the new
feature)  "Hey, thats pretty cool, i can cut and paste with a mouse now and
it won't require manual editing later" and many people have made this
argument; many other people have made the argument of "if its not in an
interactive terminal, NOTHING CHANGED" because so many thought that "well
crap I can't rely on any scripts to work anymore"

...

Let us all learn from history, on this same maillist, of when and when not
to change the default workings of a 40 year old tool.
Perhaps, there are better things to do with the time than argue a point
that will cause NUMEROUS people grief in the future.

Mike

--00000000000047e197057143a49a
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_quote"><div dir=3D"ltr">On Wed, Jul 18=
, 2018 at 4:24 AM L A Walsh &lt;<a href=3D"mailto:coreutils@HIDDEN">core=
utils@HIDDEN</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" s=
tyle=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In t=
he case of creating a link to a directory there is<br>
no choice in creating a &quot;working solution&quot;.=C2=A0 If you want a l=
ink <br>
there, it HAS to be a symlink.=C2=A0 That the user would bother to<br>
use the &#39;ln&#39; (link) command in the first place is a sufficiently<br=
>
convincing &quot;argument&quot; that they really DID want a link there.<br>
That they didn&#39;t explicitly specify the type should additionally<br>
be taken that they didn&#39;t care enough to specify the type -- only<br>
that the link be created.<br>
<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 I hope that clarifies that I&#39;m not attempti=
ng to always<br>
find some &quot;automatic action&quot;, but saw that in this case, it<br>
wouldn&#39;t be hard to figure out what was wanted and that doing<br>
so wouldn&#39;t be hard to undo if it was not.<br>
<br>
<br></blockquote><div><br></div><div>I wager that some people *aren&#39;t* =
aware that you cannot hardlink a directory, and instead of writing hundreds=
 of NEW bug reports &quot;linking broken&quot; &quot;why can&#39;t I link a=
 directory&quot; leaving &#39;ln&#39; as it has been since the dawn of time=
 is the better option.</div><div><br></div><div>You don&#39;t think this wi=
ll happen? I assure you it will.=C2=A0</div><div><br></div><div>Look at the=
 YEARS of new users being introduced, as their distributions finally &#39;s=
tabilize&#39; newer coreutils, to the new &quot;Quoted Filenames&quot; in &=
#39;ls&#39; . So many people have been totally confused, angry, and rather =
taken aback that such an old utility did something different.</div><div><br=
></div><div>Even when it could be argued(and I said exactly this when I saw=
 the new feature)=C2=A0 &quot;Hey, thats pretty cool, i can cut and paste w=
ith a mouse now and it won&#39;t require manual editing later&quot; and man=
y people have made this argument; many other people have made the argument =
of &quot;if its not in an interactive terminal, NOTHING CHANGED&quot; becau=
se so many thought that &quot;well crap I can&#39;t rely on any scripts to =
work anymore&quot;=C2=A0</div><div><br></div><div>...</div><div><br></div><=
div>Let us all learn from history, on this same maillist, of when and when =
not to change the default workings of a 40 year old tool.=C2=A0</div><div>P=
erhaps, there are better things to do with the time than argue a point that=
 will cause NUMEROUS people grief in the future.=C2=A0</div><div><br></div>=
<div>Mike</div></div></div>

--00000000000047e197057143a49a--




Information forwarded to bug-coreutils@HIDDEN:
bug#32127; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 18 Jul 2018 10:24:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 18 06:24:18 2018
Received: from localhost ([127.0.0.1]:46165 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ffjd3-0006o3-T3
	for submit <at> debbugs.gnu.org; Wed, 18 Jul 2018 06:24:18 -0400
Received: from eggs.gnu.org ([208.118.235.92]:40406)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <coreutils@HIDDEN>) id 1ffjd1-0006no-M8
 for submit <at> debbugs.gnu.org; Wed, 18 Jul 2018 06:24:15 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <coreutils@HIDDEN>) id 1ffjcv-0003Re-Oc
 for submit <at> debbugs.gnu.org; Wed, 18 Jul 2018 06:24:10 -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]:56999)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <coreutils@HIDDEN>) id 1ffjcv-0003RZ-LL
 for submit <at> debbugs.gnu.org; Wed, 18 Jul 2018 06:24:09 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:59596)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <coreutils@HIDDEN>) id 1ffjcu-0006j1-Jh
 for bug-coreutils@HIDDEN; Wed, 18 Jul 2018 06:24:09 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <coreutils@HIDDEN>) id 1ffjcr-0003Q9-B9
 for bug-coreutils@HIDDEN; Wed, 18 Jul 2018 06:24:08 -0400
Received: from ishtar.tlinx.org ([173.164.175.65]:39708
 helo=Ishtar.sc.tlinx.org)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <coreutils@HIDDEN>)
 id 1ffjcr-0003P7-36; Wed, 18 Jul 2018 06:24:05 -0400
Received: from [192.168.3.12] (Athenae [192.168.3.12])
 by Ishtar.sc.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id
 w6IANx8T073290; Wed, 18 Jul 2018 03:24:01 -0700
Message-ID: <5B4F153F.1010808@HIDDEN>
Date: Wed, 18 Jul 2018 03:23:59 -0700
From: L A Walsh <coreutils@HIDDEN>
User-Agent: Thunderbird
MIME-Version: 1.0
To: coreutils@HIDDEN, Coreutils <bug-coreutils@HIDDEN>
Subject: Re: bug#32127: RFE -- in the way "cp -rl" -- enable 'ln' to
 do	likewise?
References: <5B465A80.8030104@HIDDEN>	<a8b9d013-8886-5b8a-741b-50219255f94a@HIDDEN>	<5B470062.8070909@HIDDEN>	<9fad6da1-9ca5-a3ce-fe32-0cc27e10b879@HIDDEN>	<5B4A381A.8040708@HIDDEN>	<bbaa9e90-f896-c4a4-2f96-eb2b0556c73b@HIDDEN>	<5B4DA817.6080407@HIDDEN>	<9b5414ce-89be-11e8-9b6a-00163eeb5320@HIDDEN>	<5B4E5C62.8020701@HIDDEN>
 <001a0e9c-8a2b-11e8-9b6a-00163eeb5320@HIDDEN>
In-Reply-To: <001a0e9c-8a2b-11e8-9b6a-00163eeb5320@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no
 timestamps) [generic] [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)



Michael Stone wrote:
> On Tue, Jul 17, 2018 at 02:15:14PM -0700, L A Walsh wrote:
>>   I can't think of a similar failure mode that I'd want a hard link
>> created
> 
> Yes, you've made that clear
---
	I think you are making it clear that you didn't
understand what I said and why I said it.

	I said that I could not think of a similar situation 
that would involve creating a hard link by default, as I would
not be less than 50% certain it was what was wanted.

	That is directly the opposite of my initial proposal
to handle directories differently and default to the only
option that works rather than assuming they got it wrong
and issuing an error message and not doing anything useful
for them.

	You seem to think my positions on the two types of links
would be the same when they are not.  In almost any
circumstance where you could create a hardlink, you could also
create a symlink -- I.e. if you *wanted* to try to do what the
user wanted, there is no way to know -- since there are two
possibilities.

	In the case of creating a link to a directory there is
no choice in creating a "working solution".  If you want a link 
there, it HAS to be a symlink.  That the user would bother to
use the 'ln' (link) command in the first place is a sufficiently
convincing "argument" that they really DID want a link there.
That they didn't explicitly specify the type should additionally
be taken that they didn't care enough to specify the type -- only
that the link be created.

	I hope that clarifies that I'm not attempting to always
find some "automatic action", but saw that in this case, it
wouldn't be hard to figure out what was wanted and that doing
so wouldn't be hard to undo if it was not.





Information forwarded to bug-coreutils@HIDDEN:
bug#32127; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 18 Jul 2018 01:37:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 17 21:37:01 2018
Received: from localhost ([127.0.0.1]:46032 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ffbOm-0006qW-Vm
	for submit <at> debbugs.gnu.org; Tue, 17 Jul 2018 21:37:01 -0400
Received: from eggs.gnu.org ([208.118.235.92]:58963)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mstone@HIDDEN>) id 1ffbOl-0006qK-G2
 for submit <at> debbugs.gnu.org; Tue, 17 Jul 2018 21:36:59 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <mstone@HIDDEN>) id 1ffbOf-0000wS-D2
 for submit <at> debbugs.gnu.org; Tue, 17 Jul 2018 21:36:54 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:43011)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <mstone@HIDDEN>) id 1ffbOf-0000wC-8x
 for submit <at> debbugs.gnu.org; Tue, 17 Jul 2018 21:36:53 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:49910)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <mstone@HIDDEN>) id 1ffbOe-000061-5B
 for bug-coreutils@HIDDEN; Tue, 17 Jul 2018 21:36:53 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <mstone@HIDDEN>) id 1ffbOc-0000sB-Vu
 for bug-coreutils@HIDDEN; Tue, 17 Jul 2018 21:36:52 -0400
Received: from harad.mathom.us ([2600:1f14:b69:e700:3341:fc4e:d392:4ada]:34665)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <mstone@HIDDEN>)
 id 1ffbOc-0000q0-My; Tue, 17 Jul 2018 21:36:50 -0400
Received: from osgiliath.mathom.us (osgiliath.mathom.us
 [IPv6:2001:470:e4c3:2341::2])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by harad.mathom.us (Postfix) with ESMTPSA id A63D538C;
 Wed, 18 Jul 2018 01:36:48 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by osgiliath.mathom.us (Postfix) with ESMTP id C51176E698;
 Tue, 17 Jul 2018 21:36:47 -0400 (EDT)
Received: from osgiliath.mathom.us ([127.0.0.1])
 by localhost (osgiliath.mathom.us [127.0.0.1]) (amavisd-new, port 10024)
 with LMTP id RfxVcHbqQQPb; Tue, 17 Jul 2018 21:36:47 -0400 (EDT)
Received: by osgiliath.mathom.us (Postfix, from userid 1000)
 id AC09D6E872; Tue, 17 Jul 2018 21:36:47 -0400 (EDT)
Date: Tue, 17 Jul 2018 21:36:47 -0400
From: Michael Stone <mstone@HIDDEN>
To: coreutils@HIDDEN, Coreutils <bug-coreutils@HIDDEN>
Subject: Re: bug#32127: RFE -- in the way "cp -rl" -- enable 'ln' to do
 likewise?
Message-ID: <001a0e9c-8a2b-11e8-9b6a-00163eeb5320@HIDDEN>
Mail-Followup-To: coreutils@HIDDEN, Coreutils <bug-coreutils@HIDDEN>
References: <5B465A80.8030104@HIDDEN>
 <a8b9d013-8886-5b8a-741b-50219255f94a@HIDDEN>
 <5B470062.8070909@HIDDEN>
 <9fad6da1-9ca5-a3ce-fe32-0cc27e10b879@HIDDEN>
 <5B4A381A.8040708@HIDDEN>
 <bbaa9e90-f896-c4a4-2f96-eb2b0556c73b@HIDDEN>
 <5B4DA817.6080407@HIDDEN>
 <9b5414ce-89be-11e8-9b6a-00163eeb5320@HIDDEN>
 <5B4E5C62.8020701@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Disposition: inline
In-Reply-To: <5B4E5C62.8020701@HIDDEN>
X-Pgp-Fingerprint: 02D5 315F F11F 1861 860E  1E02 F61A ACDC FA11 FFDE
User-Agent: NeoMutt/20170113 (1.7.2)
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: -5.0 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

On Tue, Jul 17, 2018 at 02:15:14PM -0700, L A Walsh wrote:
>   I can't think of a similar failure mode that I'd want a hard link
>created

Yes, you've made that clear




Information forwarded to bug-coreutils@HIDDEN:
bug#32127; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 17 Jul 2018 21:15:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 17 17:15:41 2018
Received: from localhost ([127.0.0.1]:45833 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ffXJt-00014A-1G
	for submit <at> debbugs.gnu.org; Tue, 17 Jul 2018 17:15:41 -0400
Received: from eggs.gnu.org ([208.118.235.92]:41588)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <coreutils@HIDDEN>) id 1ffXJr-00013x-BJ
 for submit <at> debbugs.gnu.org; Tue, 17 Jul 2018 17:15:39 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <coreutils@HIDDEN>) id 1ffXJk-0002M3-4d
 for submit <at> debbugs.gnu.org; Tue, 17 Jul 2018 17:15:33 -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]:42164)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <coreutils@HIDDEN>) id 1ffXJj-0002Ln-Ve
 for submit <at> debbugs.gnu.org; Tue, 17 Jul 2018 17:15:32 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:60768)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <coreutils@HIDDEN>) id 1ffXJi-0007AU-NM
 for bug-coreutils@HIDDEN; Tue, 17 Jul 2018 17:15:31 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <coreutils@HIDDEN>) id 1ffXJd-0002G5-Ig
 for bug-coreutils@HIDDEN; Tue, 17 Jul 2018 17:15:30 -0400
Received: from ishtar.tlinx.org ([173.164.175.65]:40394
 helo=Ishtar.sc.tlinx.org)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <coreutils@HIDDEN>)
 id 1ffXJd-0002Em-A8; Tue, 17 Jul 2018 17:15:25 -0400
Received: from [192.168.3.12] (Athenae [192.168.3.12])
 by Ishtar.sc.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id
 w6HLFF4E011539; Tue, 17 Jul 2018 14:15:17 -0700
Message-ID: <5B4E5C62.8020701@HIDDEN>
Date: Tue, 17 Jul 2018 14:15:14 -0700
From: L A Walsh <coreutils@HIDDEN>
User-Agent: Thunderbird
MIME-Version: 1.0
To: coreutils@HIDDEN, Coreutils <bug-coreutils@HIDDEN>
Subject: Re: bug#32127: RFE -- in the way "cp -rl" -- enable 'ln' to do
 likewise?
References: <5B465A80.8030104@HIDDEN>	<a8b9d013-8886-5b8a-741b-50219255f94a@HIDDEN>	<5B470062.8070909@HIDDEN>	<9fad6da1-9ca5-a3ce-fe32-0cc27e10b879@HIDDEN>	<5B4A381A.8040708@HIDDEN>	<bbaa9e90-f896-c4a4-2f96-eb2b0556c73b@HIDDEN>	<5B4DA817.6080407@HIDDEN>
 <9b5414ce-89be-11e8-9b6a-00163eeb5320@HIDDEN>
In-Reply-To: <9b5414ce-89be-11e8-9b6a-00163eeb5320@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no
 timestamps) [generic] [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
Cc: mstone@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

Michael Stone wrote:
> On Tue, Jul 17, 2018 at 01:25:59AM -0700, L A Walsh wrote:
>   
>> 	I am not suggesting handing out alternates when you have a
>> choice.  I'm suggesting doing something useful in a case where there are
>> no alternates and no downsides.  If you can come up with a case where
>> a symlink to a directory would do more harm than a hardlink, I might agree,
>> but in this case, hardlinks are not supported.  So there can be no
>> "dramatic consequences".  I.e. that sounds more like FUD for the sake
>> of argument than a sound engineering analysis.
>>     
>
> You want to change the semantics of a command that's been around for 40 
> years, which can be used as an atomic primitive, which has the very 
> simple semantics of "make this hard link or fail", and your idea of a 
> "sound engineering analysis" is "I don't see how this could cause a 
> problem"?
>   
----
    I can't think of a similar failure mode that I'd want a hard link
created, so I can't say I'd be in favor of that or not.

    In this case, we aren't talking about atomic primitives -- or hard
links.  If you can make a hard link to a directory, I'll stand corrected,
but this is using 'ln' to create a sym link to a directory -- something
that can't fail in standard linux.

I don't see how this could cause a problem = I see no way for this to cause
a problem =>  I assert it can't in normal usage.  If you create an OS where
symlinking a directory removes it, then that is not what we are talking
about here.

OTOH, Just as redhat et al changed the semantics of both symlinks and
hardlinks via a setting in the kernel, I suppose a solution could be
implemented there: if the kernel detects an attempted hardlink to a
directory, it creates a symlink instead.

Do you really see modifying the linux kernel and how it handles links as
being safer than adding the proposed behavior to 'ln'?  I would be 
surprised if many linux users knew where to disable the new behaviors 
(which are enabled
by default in many distros) that change default semantics.  I suspect
most users weren't even aware of the change, though I hit the change on
the first new kernel with the features.  The features were based on 2 linux
security firms -- one being gr_security -- the company that tried to silence
a security researcher pointing out their poor security practices.

A review of the stated reasons for making these kernel changes points to
their them being necessary to get around other poor security decisions
that most unix old-hands knew ages ago -- reasons for having tmp files on
separate partitions from user, tmp, and system files, and reasons why adding
new security features that don't apply to root can cause problems.
(most users can rely on not accidently overwriting someone elses files in
/tmp.  Since root can override such restrictions, they can more easily
be exposed to disintegrous files.

Anyway, since only values 0/1 were used for symlink control, it would be
easy to say, value==2, would auto create a symlink to a dir when any
type of link is attempted. 

Of course, I was just suggesting an ease-of-use change for the 'ln' program
to create the only viable type of link one can make when trying to make
one pointing to a directory.  But if you think that's too risky despite
not being able to come up with any solid examples, then the same feature 
could
be built into the kernel and probably with less FUD.

Note that the the change to ln was to follow along in the path of 'cp 
-rl', where even though hard-linking is specified, "creates" directories 
-- which
would seem to violate your "atomic primitive" behavior, no?






>
>
>   




Information forwarded to bug-coreutils@HIDDEN:
bug#32127; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 17 Jul 2018 12:52:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 17 08:52:16 2018
Received: from localhost ([127.0.0.1]:44574 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ffPSi-0003Sc-Dg
	for submit <at> debbugs.gnu.org; Tue, 17 Jul 2018 08:52:16 -0400
Received: from eggs.gnu.org ([208.118.235.92]:47258)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mstone@HIDDEN>) id 1ffPSg-0003SO-Rb
 for submit <at> debbugs.gnu.org; Tue, 17 Jul 2018 08:52:15 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <mstone@HIDDEN>) id 1ffPSb-0000WC-0v
 for submit <at> debbugs.gnu.org; Tue, 17 Jul 2018 08:52:09 -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]:36892)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <mstone@HIDDEN>) id 1ffPSa-0000W2-Tq
 for submit <at> debbugs.gnu.org; Tue, 17 Jul 2018 08:52:08 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:38221)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <mstone@HIDDEN>) id 1ffPSZ-0002mL-OB
 for bug-coreutils@HIDDEN; Tue, 17 Jul 2018 08:52:08 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <mstone@HIDDEN>) id 1ffPSW-0000T4-MU
 for bug-coreutils@HIDDEN; Tue, 17 Jul 2018 08:52:07 -0400
Received: from harad.mathom.us ([54.218.24.45]:54218)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <mstone@HIDDEN>)
 id 1ffPSW-0000QQ-Fe; Tue, 17 Jul 2018 08:52:04 -0400
Received: from osgiliath.mathom.us (osgiliath.mathom.us
 [IPv6:2001:470:e4c3:2341::2])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by harad.mathom.us (Postfix) with ESMTPSA id 5CBB9445;
 Tue, 17 Jul 2018 12:52:00 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by osgiliath.mathom.us (Postfix) with ESMTP id 3D4396E449;
 Tue, 17 Jul 2018 08:51:59 -0400 (EDT)
Received: from osgiliath.mathom.us ([127.0.0.1])
 by localhost (osgiliath.mathom.us [127.0.0.1]) (amavisd-new, port 10024)
 with LMTP id OuC-chTlCqvT; Tue, 17 Jul 2018 08:51:59 -0400 (EDT)
Received: by osgiliath.mathom.us (Postfix, from userid 1000)
 id 14D336E872; Tue, 17 Jul 2018 08:51:59 -0400 (EDT)
Date: Tue, 17 Jul 2018 08:51:59 -0400
From: Michael Stone <mstone@HIDDEN>
To: coreutils@HIDDEN, Coreutils <bug-coreutils@HIDDEN>
Subject: Re: bug#32127: RFE -- in the way "cp -rl" -- enable 'ln' to do
 likewise?
Message-ID: <9b5414ce-89be-11e8-9b6a-00163eeb5320@HIDDEN>
Mail-Followup-To: coreutils@HIDDEN, Coreutils <bug-coreutils@HIDDEN>
References: <5B465A80.8030104@HIDDEN>
 <a8b9d013-8886-5b8a-741b-50219255f94a@HIDDEN>
 <5B470062.8070909@HIDDEN>
 <9fad6da1-9ca5-a3ce-fe32-0cc27e10b879@HIDDEN>
 <5B4A381A.8040708@HIDDEN>
 <bbaa9e90-f896-c4a4-2f96-eb2b0556c73b@HIDDEN>
 <5B4DA817.6080407@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Disposition: inline
In-Reply-To: <5B4DA817.6080407@HIDDEN>
X-Pgp-Fingerprint: 02D5 315F F11F 1861 860E  1E02 F61A ACDC FA11 FFDE
User-Agent: NeoMutt/20170113 (1.7.2)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

On Tue, Jul 17, 2018 at 01:25:59AM -0700, L A Walsh wrote:
>	I am not suggesting handing out alternates when you have a
>choice.  I'm suggesting doing something useful in a case where there are
>no alternates and no downsides.  If you can come up with a case where
>a symlink to a directory would do more harm than a hardlink, I might agree,
>but in this case, hardlinks are not supported.  So there can be no
>"dramatic consequences".  I.e. that sounds more like FUD for the sake
>of argument than a sound engineering analysis.

You want to change the semantics of a command that's been around for 40 
years, which can be used as an atomic primitive, which has the very 
simple semantics of "make this hard link or fail", and your idea of a 
"sound engineering analysis" is "I don't see how this could cause a 
problem"?




Information forwarded to bug-coreutils@HIDDEN:
bug#32127; Package coreutils. Full text available.

Message received at 32127 <at> debbugs.gnu.org:


Received: (at 32127) by debbugs.gnu.org; 17 Jul 2018 09:20:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 17 05:20:26 2018
Received: from localhost ([127.0.0.1]:44417 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ffM9i-0000kQ-Ff
	for submit <at> debbugs.gnu.org; Tue, 17 Jul 2018 05:20:26 -0400
Received: from mailgw1.uni-kl.de ([131.246.120.220]:35838)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <auerswal@HIDDEN>) id 1ffM9g-0000kD-4G
 for 32127 <at> debbugs.gnu.org; Tue, 17 Jul 2018 05:20:24 -0400
Received: from sushi.unix-ag.uni-kl.de (sushi.unix-ag.uni-kl.de
 [IPv6:2001:638:208:ef34:0:ff:fe00:65])
 by mailgw1.uni-kl.de (8.14.4/8.14.4/Debian-8+deb8u2) with ESMTP id
 w6H9Jvh9001029
 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT);
 Tue, 17 Jul 2018 11:19:57 +0200
Received: from sushi.unix-ag.uni-kl.de (ip6-localhost [IPv6:::1])
 by sushi.unix-ag.uni-kl.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id
 w6H9K85V010328
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO);
 Tue, 17 Jul 2018 11:20:08 +0200
Received: (from auerswal@localhost)
 by sushi.unix-ag.uni-kl.de (8.14.4/8.14.4/Submit) id w6H9K8Dh010327;
 Tue, 17 Jul 2018 11:20:08 +0200
Date: Tue, 17 Jul 2018 11:20:08 +0200
From: Erik Auerswald <auerswal@HIDDEN>
To: Bernhard Voelker <mail@HIDDEN>
Subject: Re: bug#32127: RFE -- in the way "cp -rl" -- enable 'ln' to do
 likewise?
Message-ID: <20180717092008.GA9936@HIDDEN>
References: <5B465A80.8030104@HIDDEN>
 <a8b9d013-8886-5b8a-741b-50219255f94a@HIDDEN>
 <5B470062.8070909@HIDDEN>
 <9fad6da1-9ca5-a3ce-fe32-0cc27e10b879@HIDDEN>
 <5B4A381A.8040708@HIDDEN>
 <bbaa9e90-f896-c4a4-2f96-eb2b0556c73b@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <bbaa9e90-f896-c4a4-2f96-eb2b0556c73b@HIDDEN>
User-Agent: Mutt/1.5.21 (2010-09-15)
X-Spam-Status: No, hits=-1, tests=ALL_TRUSTED=-1
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 32127
Cc: Paul Eggert <eggert@HIDDEN>, L A Walsh <coreutils@HIDDEN>,
 coreutils@HIDDEN, 32127 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi,

On Mon, Jul 16, 2018 at 11:14:21PM +0200, Bernhard Voelker wrote:
> On 07/14/2018 07:51 PM, L A Walsh wrote:
> > Paul Eggert wrote:
> >> On 07/12/2018 02:16 AM, L A Walsh wrote:
> >>>     I'm asking why does 'ln' bother to tell the user that they are
> >>> wrong and do nothing useful?  Why not just go ahead and create a symlink
> >>
> >> The user didn't ask for a symlink,
> > User didn't ask for a physical or hardlink (-P) either.  Just asked
> > for a link, kind unspecified.
> > 
> >> and it sounds unwise for ln to be
> >> second-guessing that.
> > ---
> >   True - should **probably** have given them *SOME* link.  Since
> > they didn't specify Physical or Symlink...either would be fine.
> > 
> > 
> >> Sometimes, reporting an error and exiting is a
> >> better thing to do.
> > ---
> > 	Unless they claim to want one or the other (-P or -l), unless
> > it is an "undo-able" operation (like one that deletes data), why would
> > you guarantee ln doing the wrong thing, rather than having a better than
> > 50% chance of doing the right thing?
> 
> I disagree here: some people are not that familiar with the differences
> between symlinks and hardlinks, okay, but the consequences for using either
> type may be quite dramatic later on.  Therefore I think it's better to give
> a helping error instead of second-guessing what the user *may* have wanted.
> The point is: also an experienced user may sometimes forget to specify
> the -s option, and I'm sure they *want* a proper error message.

Just as food for thought: how about adding an option to ln to try to do
the right thing? That option could be used in an alias so that it is not
needed to always type it. Perhaps in time some GNU/Linux distributions
even add that option to their default aliases.

The option name could be --do-what-i-mean or --do-the-right-thing
or --fallback-symbolic (I am quite sure everyone can come with
additionalsuggestions. ;) Please do not take these suggestions too
seriously. ;-)

Anyway, I understand both sides of this discussion, and I definitely do
not expect anyone to go ahead and implement my solution. It is just a
suggestion for whomever wants to have this functionality, and intends
to implement it themselves, on how to find a compromise that might be
acceptable upstream.

Peace,
Erik
-- 
Be water, my friend.
                        -- Bruce Lee




Information forwarded to bug-coreutils@HIDDEN:
bug#32127; Package coreutils. Full text available.

Message received at 32127 <at> debbugs.gnu.org:


Received: (at 32127) by debbugs.gnu.org; 17 Jul 2018 08:26:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 17 04:26:18 2018
Received: from localhost ([127.0.0.1]:44390 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ffLJJ-0007v1-Pj
	for submit <at> debbugs.gnu.org; Tue, 17 Jul 2018 04:26:17 -0400
Received: from ishtar.tlinx.org ([173.164.175.65]:43834
 helo=Ishtar.sc.tlinx.org) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <coreutils@HIDDEN>) id 1ffLJH-0007us-Kq
 for 32127 <at> debbugs.gnu.org; Tue, 17 Jul 2018 04:26:16 -0400
Received: from [192.168.3.12] (Athenae [192.168.3.12])
 by Ishtar.sc.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id
 w6H8PxoI042363; Tue, 17 Jul 2018 01:26:01 -0700
Message-ID: <5B4DA817.6080407@HIDDEN>
Date: Tue, 17 Jul 2018 01:25:59 -0700
From: L A Walsh <coreutils@HIDDEN>
User-Agent: Thunderbird
MIME-Version: 1.0
To: Bernhard Voelker <mail@HIDDEN>
Subject: Re: bug#32127: RFE -- in the way "cp -rl" -- enable 'ln' to do
 likewise?
References: <5B465A80.8030104@HIDDEN>
 <a8b9d013-8886-5b8a-741b-50219255f94a@HIDDEN>
 <5B470062.8070909@HIDDEN>
 <9fad6da1-9ca5-a3ce-fe32-0cc27e10b879@HIDDEN>
 <5B4A381A.8040708@HIDDEN>
 <bbaa9e90-f896-c4a4-2f96-eb2b0556c73b@HIDDEN>
In-Reply-To: <bbaa9e90-f896-c4a4-2f96-eb2b0556c73b@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 32127
Cc: Paul Eggert <eggert@HIDDEN>, Coreutils <bug-coreutils@HIDDEN>,
 coreutils@HIDDEN, 32127 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)



Bernhard Voelker wrote:

> 
> I disagree here: some people are not that familiar with the differences
> between symlinks and hardlinks, okay, but the consequences for using either
> type may be quite dramatic later on.
----
	I am not suggesting handing out alternates when you have a
choice.  I'm suggesting doing something useful in a case where there are
no alternates and no downsides.  If you can come up with a case where
a symlink to a directory would do more harm than a hardlink, I might agree,
but in this case, hardlinks are not supported.  So there can be no
"dramatic consequences".  I.e. that sounds more like FUD for the sake
of argument than a sound engineering analysis.

> Therefore I think it's better to give
> a helping error instead of second-guessing what the user *may* have wanted.
----
	I said doing both would be fine -- i.e. creating the symlink
and issuing a warning that a symlink was used.

> The point is: also an experienced user may sometimes forget to specify
> the -s option, and I'm sure they *want* a proper error message.
----
	I think I'd fall into the category of experienced user -- more
so than most.  I really don't care about a proper error message nor do I
prefer to type in '-s'.  I just wanted the link of the right type for
linking to a directory.  Your example of what an experience user would want
is conjecture, and in this case, incorrect.  Additionally, your initial
argument refers to cases that cannot occur or happen w/modern linux (or 
unix) systems.  I repeat -- what dramatic consequence could happen here
where the user got a symbolic link, but somehow expected expected a hard
link -- what worse behavior would a symbolic link enable that wouldn't have
happened with a hard or physical link?

	If you can come up with a realistic case where such code 
creates dramatic effects/consequences, then lets have a discussion on real
problems -- not on things that don't exist.





Information forwarded to bug-coreutils@HIDDEN:
bug#32127; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 17 Jul 2018 08:26:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 17 04:26:34 2018
Received: from localhost ([127.0.0.1]:44393 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ffLJa-0007va-1q
	for submit <at> debbugs.gnu.org; Tue, 17 Jul 2018 04:26:34 -0400
Received: from eggs.gnu.org ([208.118.235.92]:47792)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <coreutils@HIDDEN>) id 1ffLJY-0007vK-MS
 for submit <at> debbugs.gnu.org; Tue, 17 Jul 2018 04:26:32 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <coreutils@HIDDEN>) id 1ffLJS-0007HN-KW
 for submit <at> debbugs.gnu.org; Tue, 17 Jul 2018 04:26:27 -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.0 required=5.0 tests=BAYES_40 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:39025)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <coreutils@HIDDEN>) id 1ffLJS-0007H3-Hb
 for submit <at> debbugs.gnu.org; Tue, 17 Jul 2018 04:26:26 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:38754)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <coreutils@HIDDEN>) id 1ffLJR-0005BS-Fb
 for bug-coreutils@HIDDEN; Tue, 17 Jul 2018 04:26:26 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <coreutils@HIDDEN>) id 1ffLJM-0007Eg-H0
 for bug-coreutils@HIDDEN; Tue, 17 Jul 2018 04:26:25 -0400
Received: from ishtar.tlinx.org ([173.164.175.65]:39558
 helo=Ishtar.sc.tlinx.org)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <coreutils@HIDDEN>)
 id 1ffLJM-0007DL-90; Tue, 17 Jul 2018 04:26:20 -0400
Received: from [192.168.3.12] (Athenae [192.168.3.12])
 by Ishtar.sc.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id
 w6H8PxoI042363; Tue, 17 Jul 2018 01:26:01 -0700
Message-ID: <5B4DA817.6080407@HIDDEN>
Date: Tue, 17 Jul 2018 01:25:59 -0700
From: L A Walsh <coreutils@HIDDEN>
User-Agent: Thunderbird
MIME-Version: 1.0
To: Bernhard Voelker <mail@HIDDEN>
Subject: Re: bug#32127: RFE -- in the way "cp -rl" -- enable 'ln' to do
 likewise?
References: <5B465A80.8030104@HIDDEN>
 <a8b9d013-8886-5b8a-741b-50219255f94a@HIDDEN>
 <5B470062.8070909@HIDDEN>
 <9fad6da1-9ca5-a3ce-fe32-0cc27e10b879@HIDDEN>
 <5B4A381A.8040708@HIDDEN>
 <bbaa9e90-f896-c4a4-2f96-eb2b0556c73b@HIDDEN>
In-Reply-To: <bbaa9e90-f896-c4a4-2f96-eb2b0556c73b@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no
 timestamps) [generic] [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
Cc: Paul Eggert <eggert@HIDDEN>, Coreutils <bug-coreutils@HIDDEN>,
 coreutils@HIDDEN, 32127 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)



Bernhard Voelker wrote:

> 
> I disagree here: some people are not that familiar with the differences
> between symlinks and hardlinks, okay, but the consequences for using either
> type may be quite dramatic later on.
----
	I am not suggesting handing out alternates when you have a
choice.  I'm suggesting doing something useful in a case where there are
no alternates and no downsides.  If you can come up with a case where
a symlink to a directory would do more harm than a hardlink, I might agree,
but in this case, hardlinks are not supported.  So there can be no
"dramatic consequences".  I.e. that sounds more like FUD for the sake
of argument than a sound engineering analysis.

> Therefore I think it's better to give
> a helping error instead of second-guessing what the user *may* have wanted.
----
	I said doing both would be fine -- i.e. creating the symlink
and issuing a warning that a symlink was used.

> The point is: also an experienced user may sometimes forget to specify
> the -s option, and I'm sure they *want* a proper error message.
----
	I think I'd fall into the category of experienced user -- more
so than most.  I really don't care about a proper error message nor do I
prefer to type in '-s'.  I just wanted the link of the right type for
linking to a directory.  Your example of what an experience user would want
is conjecture, and in this case, incorrect.  Additionally, your initial
argument refers to cases that cannot occur or happen w/modern linux (or 
unix) systems.  I repeat -- what dramatic consequence could happen here
where the user got a symbolic link, but somehow expected expected a hard
link -- what worse behavior would a symbolic link enable that wouldn't have
happened with a hard or physical link?

	If you can come up with a realistic case where such code 
creates dramatic effects/consequences, then lets have a discussion on real
problems -- not on things that don't exist.





Information forwarded to bug-coreutils@HIDDEN:
bug#32127; Package coreutils. Full text available.

Message received at 32127 <at> debbugs.gnu.org:


Received: (at 32127) by debbugs.gnu.org; 16 Jul 2018 21:14:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 16 17:14:46 2018
Received: from localhost ([127.0.0.1]:44085 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ffApS-0000Zy-DI
	for submit <at> debbugs.gnu.org; Mon, 16 Jul 2018 17:14:46 -0400
Received: from mout.kundenserver.de ([212.227.17.10]:58081)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1ffApQ-0000Zi-Cz
 for 32127 <at> debbugs.gnu.org; Mon, 16 Jul 2018 17:14:44 -0400
Received: from [192.168.101.10] ([91.1.213.175]) by mrelayeu.kundenserver.de
 (mreue105 [212.227.15.183]) with ESMTPSA (Nemesis) id
 0MVuae-1fYgaN3pma-00X5jM; Mon, 16 Jul 2018 23:14:24 +0200
Subject: Re: bug#32127: RFE -- in the way "cp -rl" -- enable 'ln' to do
 likewise?
To: L A Walsh <coreutils@HIDDEN>, Paul Eggert <eggert@HIDDEN>
References: <5B465A80.8030104@HIDDEN>
 <a8b9d013-8886-5b8a-741b-50219255f94a@HIDDEN>
 <5B470062.8070909@HIDDEN>
 <9fad6da1-9ca5-a3ce-fe32-0cc27e10b879@HIDDEN>
 <5B4A381A.8040708@HIDDEN>
From: Bernhard Voelker <mail@HIDDEN>
Openpgp: preference=signencrypt
Autocrypt: addr=mail@HIDDEN; prefer-encrypt=mutual; keydata=
 xsBNBFPirzMBCACyzYldTjQ4ufFOkByY5Nn5USb5GFoL48nWBwNHjd9KUbtRRNlQiPNKd6hK
 Gvd3BGi5aoFKA4ytfRk6jbAbW3jVb3R8wYaV08mOy4KVEKxqN4bxsXlMjNChXVR+rtKDmfI+
 oPTL+cPH2X6gW4W02IRbVw0uUhNm6zEedC/gNrY/mTlf1enZ46jxZ7BTUZaG+kx38UMISIMB
 zSzLRtdkwgmHj4jS3p1fF2cwRqLclIfMjKGpbNFPEXeXKWrCLcqHw78795eAR9q0YvrDkfIn
 GdDBwfb3VM4NdulwIFzvYZMSXvSbbyPLB5YkHU5aAWQHUse4WlfT5ccDpbzUYldRAvF9ABEB
 AAHNK0Jlcm5oYXJkIFZvZWxrZXIgPG1haWxAYmVybmhhcmQtdm9lbGtlci5kZT7CwHkEEwEC
 ACMFAlPirzMCGwMHCwkIBwMCAQYVCAIJCgsEFgIDAQIeAQIXgAAKCRBGUC73lpFxle5wCACC
 dbs0QaJ0vR3Sff2cKdTk41rUq3YfWngsR///IOU0C5DdkePmCnJE/lUsUy0LRTxcUDLxQR+x
 QHU8ssRT0JUO9726dI3miy36UdsgmBYaOtLvQcidGmW1R7o0PYYf04+TFtyqKgngOUBPpMgR
 6o4UsQxy/OD4bN1WDqOgIjL+D/qJpkKmgp6L6+hhaBCpiOFKRmmV7YyQ3SqVlfQNiHs5ZtkR
 nXpIjgZARV+GllKucI17bO0CGmTJZ1tstVy0+W3DQT1lbBkTTc++5LONM99D3jjn23l1ocOp
 folR53F7I4cb2RNfT23v1I59RH37lB9wMOqrKj0UjYAC2YoPGQ3BzsBNBFPirzMBCADXLWWp
 QihBldY6reca8ZKdc3T9qXEOa3akE3DWKztIBmNJhtYOjmpLYajQTkGa7UoJTnbmZE2Rn6ZE
 oNnvb0gcFNAIcY95KOI+bjOR8HEgh4cx2REXh6L6olIgyXqt/KFusE4wtVZAFxZl+30HzN6n
 D+1HvrjXxPJRX6MsIYOYyyX9/6OofwJK6QHODYGp8WL2olHDnmsXg4AT6Wlr7qKpKrQELlcF
 R4xkvdmgL/Ghw/tK0yJTxMIcewCCZWLPOXRmFRbvAadZWPAgVsJ63siNyUlVnVMSzDgTJl+s
 l/DMabXpqrJQx3/1Yy6mTaDs3XZT/wmBKaTLXx/LByaPxQQ7ABEBAAHCwF8EGAECAAkFAlPi
 rzMCGwwACgkQRlAu95aRcZWVPwgAqZT6iTXkoP37wYb41323RzhBcJ8JSk4cyBDBUXX0lMrM
 3qhiClKG7phpxVdu817Gwc6Hsecg7FfjQAV8MHQ0ZFeEFdk3b2rKBqfsStc+h49/xF3Fb+if
 CzR9qeQF82fMSxkg18++7hMcHCMO/hPZ/Q0xRi+lrSr2QKDJQuLzSyVU14TxrCkevZjEhtma
 VNvcJlJzCbiBXee9Fpc5jITUXPFG8E8dxqo1n+duOyIMgozrAnzP7X5V/Ob/Ozf/aGGX9+Jd
 inyfCX18nWcHALKMU/36Eua/ylalf/2c2YkBp9KCLVmGgPkUgW52EeRPgroIsiwu+rwCSV6Z
 UyCJ+OymCg==
Message-ID: <bbaa9e90-f896-c4a4-2f96-eb2b0556c73b@HIDDEN>
Date: Mon, 16 Jul 2018 23:14:21 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.9.0
MIME-Version: 1.0
In-Reply-To: <5B4A381A.8040708@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 8bit
X-Provags-ID: V03:K1:g47eQ4SniaxJS2NDg7RzSmc8Mf1Fg7GV/qt83B0sR9gAWNFprYi
 VzpwetCV1Ol3RX6oBaTS/FffyF0P3M2gV4m3caRGBgCr+Zgg0MXLHfLKEM8YVRAGcL4ms3i
 y2OG8/7IbS1F4ItKwWik+7TBSAyeheSC4ZQ/S+zyLCLCCyEWSr5oH5SnmLekH27SIWFsG2M
 CeLggihDjGvRofKcEw+gg==
X-UI-Out-Filterresults: notjunk:1;V01:K0:YGGVVizxn8M=:Cn7IJQeFilz1jG+z4teINb
 cKurVe/Up9wFMCRU4axyVyZ0WBocZjkMLXcz1Kok8aRDeT9kV/g7vzGeYeS8zHDwbpeLfZP98
 TNcutLb8TPTpPOPPLagGuwaCcXBKFbw2JxVyrIn349MuLIj+ATyhbqb6sSVglJWsFJki4iVlR
 s+Y8V/rjpYjliwjV2itPEeskYK4whaELVdz9SYB1sr/kfs7KxY3fypN0ipzFYNC2oR2fVbqWi
 HGQlCj0ISZnE/QP+0mplea9ykVZRzQSG2wLF2nJ+cCYkFXa23b44usEUQnXOrDDRCZRGt5qNg
 LM6uOkoSOze3Vo8cj+bizQUVUpLlBMjwLhIz7BUsG06cUl/XyR5LdvMYVWQmrxTtFn1TINwAe
 +GoWR1p757LA6H3ChICY2ozHJ5OAMRhW7Zt1SZzY7JXzalWJQfGoYU4xxlSLfooQgenXyORdD
 acLz3kPLiWjQ/P8mSZ7qt8xy5nqOjkwjvtzCe+e0DCrZuQIYAXZJfuUgXBiJUxt3ohPTtDhVl
 1NjkEeS0VM2mBeNYOBhjZm08+/2syM/TWGqA8h14LUgrimt3bBUaTqoOGY0v9zbTYei+fPSk5
 qWHADUfnv5d6dKXiBx6fS5fqqlboqOQv4zWJd07fs3jnQtgNeuYJtHF6ZHBlCPOKZwrkYT9YV
 U4JrHi1vAMjdJBCAkJGzhsYgEUVj4DDW7WYrGgSPRLWZKycRK22qY/YGTRgJ2bTW4UZJh/U04
 v/7NK+ht/7uxXucQ
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 32127
Cc: coreutils@HIDDEN, 32127 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 07/14/2018 07:51 PM, L A Walsh wrote:
> Paul Eggert wrote:
>> On 07/12/2018 02:16 AM, L A Walsh wrote:
>>>     I'm asking why does 'ln' bother to tell the user that they are
>>> wrong and do nothing useful?  Why not just go ahead and create a symlink
>>
>> The user didn't ask for a symlink,
> User didn't ask for a physical or hardlink (-P) either.  Just asked
> for a link, kind unspecified.
> 
>> and it sounds unwise for ln to be
>> second-guessing that.
> ---
>   True - should **probably** have given them *SOME* link.  Since
> they didn't specify Physical or Symlink...either would be fine.
> 
> 
>> Sometimes, reporting an error and exiting is a
>> better thing to do.
> ---
> 	Unless they claim to want one or the other (-P or -l), unless
> it is an "undo-able" operation (like one that deletes data), why would
> you guarantee ln doing the wrong thing, rather than having a better than
> 50% chance of doing the right thing?

I disagree here: some people are not that familiar with the differences
between symlinks and hardlinks, okay, but the consequences for using either
type may be quite dramatic later on.  Therefore I think it's better to give
a helping error instead of second-guessing what the user *may* have wanted.
The point is: also an experienced user may sometimes forget to specify
the -s option, and I'm sure they *want* a proper error message.

Have a nice day,
Berny




Information forwarded to bug-coreutils@HIDDEN:
bug#32127; Package coreutils. Full text available.

Message received at 32127 <at> debbugs.gnu.org:


Received: (at 32127) by debbugs.gnu.org; 14 Jul 2018 17:51:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jul 14 13:51:31 2018
Received: from localhost ([127.0.0.1]:60274 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1feOhf-0002Ve-6r
	for submit <at> debbugs.gnu.org; Sat, 14 Jul 2018 13:51:31 -0400
Received: from ishtar.tlinx.org ([173.164.175.65]:37792
 helo=Ishtar.sc.tlinx.org) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <coreutils@HIDDEN>) id 1feOhb-0002VT-JL
 for 32127 <at> debbugs.gnu.org; Sat, 14 Jul 2018 13:51:29 -0400
Received: from [192.168.3.12] (Athenae [192.168.3.12])
 by Ishtar.sc.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id
 w6EHpMOA098928; Sat, 14 Jul 2018 10:51:25 -0700
Message-ID: <5B4A381A.8040708@HIDDEN>
Date: Sat, 14 Jul 2018 10:51:22 -0700
From: L A Walsh <coreutils@HIDDEN>
User-Agent: Thunderbird
MIME-Version: 1.0
To: Paul Eggert <eggert@HIDDEN>
Subject: Re: bug#32127: RFE -- in the way "cp -rl" -- enable 'ln' to do
 likewise?
References: <5B465A80.8030104@HIDDEN>	<a8b9d013-8886-5b8a-741b-50219255f94a@HIDDEN>	<5B470062.8070909@HIDDEN>
 <9fad6da1-9ca5-a3ce-fe32-0cc27e10b879@HIDDEN>
In-Reply-To: <9fad6da1-9ca5-a3ce-fe32-0cc27e10b879@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 32127
Cc: Coreutils <bug-coreutils@HIDDEN>, Coreutils <coreutils@HIDDEN>,
 32127 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)



Paul Eggert wrote:
> On 07/12/2018 02:16 AM, L A Walsh wrote:
>>     I'm asking why does 'ln' bother to tell the user that they are
>> wrong and do nothing useful?  Why not just go ahead and create a symlink
> 
> The user didn't ask for a symlink,
User didn't ask for a physical or hardlink (-P) either.  Just asked
for a link, kind unspecified.

> and it sounds unwise for ln to be
> second-guessing that.
---
  True - should **probably** have given them *SOME* link.  Since
they didn't specify Physical or Symlink...either would be fine.


> Sometimes, reporting an error and exiting is a
> better thing to do.
---
	Unless they claim to want one or the other (-P or -l), unless
it is an "undo-able" operation (like one that deletes data), why would
you guarantee ln doing the wrong thing, rather than having a better than
50% chance of doing the right thing?







Information forwarded to bug-coreutils@HIDDEN:
bug#32127; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 14 Jul 2018 17:51:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jul 14 13:51:48 2018
Received: from localhost ([127.0.0.1]:60277 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1feOhw-0002WC-Dm
	for submit <at> debbugs.gnu.org; Sat, 14 Jul 2018 13:51:48 -0400
Received: from eggs.gnu.org ([208.118.235.92]:52970)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <coreutils@HIDDEN>) id 1feOhv-0002Vx-2M
 for submit <at> debbugs.gnu.org; Sat, 14 Jul 2018 13:51:47 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <coreutils@HIDDEN>) id 1feOhp-0003mQ-0B
 for submit <at> debbugs.gnu.org; Sat, 14 Jul 2018 13:51:41 -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.0 required=5.0 tests=BAYES_40 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:49339)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <coreutils@HIDDEN>) id 1feOho-0003mM-TA
 for submit <at> debbugs.gnu.org; Sat, 14 Jul 2018 13:51:40 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:43940)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <coreutils@HIDDEN>) id 1feOhn-0007pG-Os
 for bug-coreutils@HIDDEN; Sat, 14 Jul 2018 13:51:40 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <coreutils@HIDDEN>) id 1feOhm-0003lr-V3
 for bug-coreutils@HIDDEN; Sat, 14 Jul 2018 13:51:39 -0400
Received: from ishtar.tlinx.org ([173.164.175.65]:33516
 helo=Ishtar.sc.tlinx.org)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <coreutils@HIDDEN>)
 id 1feOhh-0003jZ-KH; Sat, 14 Jul 2018 13:51:33 -0400
Received: from [192.168.3.12] (Athenae [192.168.3.12])
 by Ishtar.sc.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id
 w6EHpMOA098928; Sat, 14 Jul 2018 10:51:25 -0700
Message-ID: <5B4A381A.8040708@HIDDEN>
Date: Sat, 14 Jul 2018 10:51:22 -0700
From: L A Walsh <coreutils@HIDDEN>
User-Agent: Thunderbird
MIME-Version: 1.0
To: Paul Eggert <eggert@HIDDEN>
Subject: Re: bug#32127: RFE -- in the way "cp -rl" -- enable 'ln' to do
 likewise?
References: <5B465A80.8030104@HIDDEN>	<a8b9d013-8886-5b8a-741b-50219255f94a@HIDDEN>	<5B470062.8070909@HIDDEN>
 <9fad6da1-9ca5-a3ce-fe32-0cc27e10b879@HIDDEN>
In-Reply-To: <9fad6da1-9ca5-a3ce-fe32-0cc27e10b879@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no
 timestamps) [generic] [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
Cc: Coreutils <bug-coreutils@HIDDEN>, Coreutils <coreutils@HIDDEN>,
 32127 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)



Paul Eggert wrote:
> On 07/12/2018 02:16 AM, L A Walsh wrote:
>>     I'm asking why does 'ln' bother to tell the user that they are
>> wrong and do nothing useful?  Why not just go ahead and create a symlink
> 
> The user didn't ask for a symlink,
User didn't ask for a physical or hardlink (-P) either.  Just asked
for a link, kind unspecified.

> and it sounds unwise for ln to be
> second-guessing that.
---
  True - should **probably** have given them *SOME* link.  Since
they didn't specify Physical or Symlink...either would be fine.


> Sometimes, reporting an error and exiting is a
> better thing to do.
---
	Unless they claim to want one or the other (-P or -l), unless
it is an "undo-able" operation (like one that deletes data), why would
you guarantee ln doing the wrong thing, rather than having a better than
50% chance of doing the right thing?







Information forwarded to bug-coreutils@HIDDEN:
bug#32127; Package coreutils. Full text available.

Message received at 32127 <at> debbugs.gnu.org:


Received: (at 32127) by debbugs.gnu.org; 13 Jul 2018 22:17:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 13 18:17:19 2018
Received: from localhost ([127.0.0.1]:59327 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fe6NL-0008Sz-Jc
	for submit <at> debbugs.gnu.org; Fri, 13 Jul 2018 18:17:19 -0400
Received: from ishtar.tlinx.org ([173.164.175.65]:47822
 helo=Ishtar.sc.tlinx.org) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <coreutils@HIDDEN>) id 1fe6NG-0008So-R4
 for 32127 <at> debbugs.gnu.org; Fri, 13 Jul 2018 18:17:15 -0400
Received: from [192.168.3.12] (Athenae [192.168.3.12])
 by Ishtar.sc.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id
 w6DMH3K2077026; Fri, 13 Jul 2018 15:17:05 -0700
Message-ID: <5B4924DF.2080508@HIDDEN>
Date: Fri, 13 Jul 2018 15:17:03 -0700
From: L A Walsh <coreutils@HIDDEN>
User-Agent: Thunderbird
MIME-Version: 1.0
To: Paul Eggert <eggert@HIDDEN>
Subject: Re: bug#32127: RFE -- in the way "cp -rl" -- enable 'ln' to do
 likewise?
References: <5B465A80.8030104@HIDDEN>
 <a8b9d013-8886-5b8a-741b-50219255f94a@HIDDEN>
 <5B470062.8070909@HIDDEN>
 <9fad6da1-9ca5-a3ce-fe32-0cc27e10b879@HIDDEN>
In-Reply-To: <9fad6da1-9ca5-a3ce-fe32-0cc27e10b879@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 32127
Cc: Coreutils <bug-coreutils@HIDDEN>, Coreutils <coreutils@HIDDEN>,
 32127 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)



Paul Eggert wrote:
> On 07/12/2018 02:16 AM, L A Walsh wrote:
>>     I'm asking why does 'ln' bother to tell the user that they are
>> wrong and do nothing useful?  Why not just go ahead and create a symlink
> 
> The user didn't ask for a symlink, and it sounds unwise for ln to be
> second-guessing that. Sometimes, reporting an error and exiting is a
> better thing to do.

Often in deciding whether it is good or not good to make a reasonable
attempt at completion factors are evaluated --  such as consequences
for trying or not trying and whether or not the user is running
interactively or not, and the likelihood of the possible solution being
what they wanted.

In this case, it seems they wanted some type of link created or they would not have used the link command.  If they link was created as a symlink because hardlinks are not available, then they have solved their problem.  If the link isn't created because hardlinks are not supported (even though they did not specify the link type (-P|-s) then ln would fail and they would need to redo the command.  

If they didn't want the link created, it would be unlikely they'd be using the 'ln' (link) command.  

Only in the case that they wanted a link -- but only a hard link, would they need to remove it -- 'ln' would have failed to do the right thing.


I posit that they wouldn't need to create a hard link in a workable
solution -- they will need to find some other way to create a solution ( perhaps mounting the file).  However if they are not root, they won't be able to use that solution.  I would suggest that it would be unlikely that they would need a hard link there and they might change their mind and decide that a symlink is fine.


In all of the cases, given the probabilities, it would be most helpful and most useful to create *some link*, as that is what they asked for by using the 'ln' command.  Non of the outcomes require any more correction than undoing the incorrect action, but it is likely they would agree that a symbolic link was the right choice given that physical links are not
available.

You said "The user didn't ask for a symlink".  Neither did they hask
for a hardlink by using "-P'.  They wanted a link.  Creating the only
possible link would seem to be the best option available.

Indeed -- my focus was on creating a link -- that it had to be a symlink
was a bit of minutia that I didn't care much about.  If I had stated that
I wanted a physical link by specifying "-P" -- then I would not suggest
auto-creating the link -- only in the case where a link was asked for
without specification of type.

Frequently is is more user friendly to do something than do nothing (assuming doing something doesn't cause damage -- which is the case here.

-L.






Information forwarded to bug-coreutils@HIDDEN:
bug#32127; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 13 Jul 2018 22:17:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 13 18:17:40 2018
Received: from localhost ([127.0.0.1]:59330 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fe6Nf-0008TV-Sb
	for submit <at> debbugs.gnu.org; Fri, 13 Jul 2018 18:17:40 -0400
Received: from eggs.gnu.org ([208.118.235.92]:37842)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <coreutils@HIDDEN>) id 1fe6Ne-0008TK-Ip
 for submit <at> debbugs.gnu.org; Fri, 13 Jul 2018 18:17:38 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <coreutils@HIDDEN>) id 1fe6NW-0002Wv-7f
 for submit <at> debbugs.gnu.org; Fri, 13 Jul 2018 18:17:33 -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]:36262)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <coreutils@HIDDEN>) id 1fe6NW-0002Wl-3v
 for submit <at> debbugs.gnu.org; Fri, 13 Jul 2018 18:17:30 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:57040)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <coreutils@HIDDEN>) id 1fe6NU-00022l-Mx
 for bug-coreutils@HIDDEN; Fri, 13 Jul 2018 18:17:29 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <coreutils@HIDDEN>) id 1fe6NS-0002Sy-Hh
 for bug-coreutils@HIDDEN; Fri, 13 Jul 2018 18:17:27 -0400
Received: from ishtar.tlinx.org ([173.164.175.65]:43550
 helo=Ishtar.sc.tlinx.org)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <coreutils@HIDDEN>)
 id 1fe6NL-0002Jz-QG; Fri, 13 Jul 2018 18:17:19 -0400
Received: from [192.168.3.12] (Athenae [192.168.3.12])
 by Ishtar.sc.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id
 w6DMH3K2077026; Fri, 13 Jul 2018 15:17:05 -0700
Message-ID: <5B4924DF.2080508@HIDDEN>
Date: Fri, 13 Jul 2018 15:17:03 -0700
From: L A Walsh <coreutils@HIDDEN>
User-Agent: Thunderbird
MIME-Version: 1.0
To: Paul Eggert <eggert@HIDDEN>
Subject: Re: bug#32127: RFE -- in the way "cp -rl" -- enable 'ln' to do
 likewise?
References: <5B465A80.8030104@HIDDEN>
 <a8b9d013-8886-5b8a-741b-50219255f94a@HIDDEN>
 <5B470062.8070909@HIDDEN>
 <9fad6da1-9ca5-a3ce-fe32-0cc27e10b879@HIDDEN>
In-Reply-To: <9fad6da1-9ca5-a3ce-fe32-0cc27e10b879@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no
 timestamps) [generic] [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
Cc: Coreutils <bug-coreutils@HIDDEN>, Coreutils <coreutils@HIDDEN>,
 32127 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)



Paul Eggert wrote:
> On 07/12/2018 02:16 AM, L A Walsh wrote:
>>     I'm asking why does 'ln' bother to tell the user that they are
>> wrong and do nothing useful?  Why not just go ahead and create a symlink
> 
> The user didn't ask for a symlink, and it sounds unwise for ln to be
> second-guessing that. Sometimes, reporting an error and exiting is a
> better thing to do.

Often in deciding whether it is good or not good to make a reasonable
attempt at completion factors are evaluated --  such as consequences
for trying or not trying and whether or not the user is running
interactively or not, and the likelihood of the possible solution being
what they wanted.

In this case, it seems they wanted some type of link created or they would not have used the link command.  If they link was created as a symlink because hardlinks are not available, then they have solved their problem.  If the link isn't created because hardlinks are not supported (even though they did not specify the link type (-P|-s) then ln would fail and they would need to redo the command.  

If they didn't want the link created, it would be unlikely they'd be using the 'ln' (link) command.  

Only in the case that they wanted a link -- but only a hard link, would they need to remove it -- 'ln' would have failed to do the right thing.


I posit that they wouldn't need to create a hard link in a workable
solution -- they will need to find some other way to create a solution ( perhaps mounting the file).  However if they are not root, they won't be able to use that solution.  I would suggest that it would be unlikely that they would need a hard link there and they might change their mind and decide that a symlink is fine.


In all of the cases, given the probabilities, it would be most helpful and most useful to create *some link*, as that is what they asked for by using the 'ln' command.  Non of the outcomes require any more correction than undoing the incorrect action, but it is likely they would agree that a symbolic link was the right choice given that physical links are not
available.

You said "The user didn't ask for a symlink".  Neither did they hask
for a hardlink by using "-P'.  They wanted a link.  Creating the only
possible link would seem to be the best option available.

Indeed -- my focus was on creating a link -- that it had to be a symlink
was a bit of minutia that I didn't care much about.  If I had stated that
I wanted a physical link by specifying "-P" -- then I would not suggest
auto-creating the link -- only in the case where a link was asked for
without specification of type.

Frequently is is more user friendly to do something than do nothing (assuming doing something doesn't cause damage -- which is the case here.

-L.






Information forwarded to bug-coreutils@HIDDEN:
bug#32127; Package coreutils. Full text available.

Message received at 32127 <at> debbugs.gnu.org:


Received: (at 32127) by debbugs.gnu.org; 13 Jul 2018 21:40:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 13 17:40:52 2018
Received: from localhost ([127.0.0.1]:59319 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fe5o4-0007cA-Ka
	for submit <at> debbugs.gnu.org; Fri, 13 Jul 2018 17:40:52 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:36342)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1fe5o2-0007bw-HI
 for 32127 <at> debbugs.gnu.org; Fri, 13 Jul 2018 17:40:51 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 93700160F20;
 Fri, 13 Jul 2018 14:40:44 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id cSqIrjZ_8rQb; Fri, 13 Jul 2018 14:40:43 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 91E1E160F72;
 Fri, 13 Jul 2018 14:40:43 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id hCrgTq2symLk; Fri, 13 Jul 2018 14:40:43 -0700 (PDT)
Received: from [192.168.0.8] (ip72-206-6-38.fv.ks.cox.net [72.206.6.38])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 4AF5B160F20;
 Fri, 13 Jul 2018 14:40:43 -0700 (PDT)
Subject: Re: bug#32127: RFE -- in the way "cp -rl" -- enable 'ln' to do
 likewise?
To: L A Walsh <coreutils@HIDDEN>
References: <5B465A80.8030104@HIDDEN>
 <a8b9d013-8886-5b8a-741b-50219255f94a@HIDDEN>
 <5B470062.8070909@HIDDEN>
From: Paul Eggert <eggert@HIDDEN>
Message-ID: <9fad6da1-9ca5-a3ce-fe32-0cc27e10b879@HIDDEN>
Date: Fri, 13 Jul 2018 16:40:42 -0500
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.9.1
MIME-Version: 1.0
In-Reply-To: <5B470062.8070909@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 32127
Cc: 32127 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

On 07/12/2018 02:16 AM, L A Walsh wrote:
>
> =C2=A0=C2=A0=C2=A0=C2=A0I'm asking why does 'ln' bother to tell the use=
r that they are
> wrong and do nothing useful?=C2=A0 Why not just go ahead and create a s=
ymlink

The user didn't ask for a symlink, and it sounds unwise for ln to be
second-guessing that. Sometimes, reporting an error and exiting is a
better thing to do.




Information forwarded to bug-coreutils@HIDDEN:
bug#32127; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 13 Jul 2018 17:04:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 13 13:04:15 2018
Received: from localhost ([127.0.0.1]:59185 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fe1UN-0000xq-4x
	for submit <at> debbugs.gnu.org; Fri, 13 Jul 2018 13:04:15 -0400
Received: from eggs.gnu.org ([208.118.235.92]:58236)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <coreutils@HIDDEN>) id 1fe1UK-0000xc-RO
 for submit <at> debbugs.gnu.org; Fri, 13 Jul 2018 13:04:13 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <coreutils@HIDDEN>) id 1fe1UE-0002fP-MS
 for submit <at> debbugs.gnu.org; Fri, 13 Jul 2018 13:04:07 -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.9 required=5.0 tests=BAYES_00,MISSING_HEADERS
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:34124)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <coreutils@HIDDEN>) id 1fe1UE-0002fC-J7
 for submit <at> debbugs.gnu.org; Fri, 13 Jul 2018 13:04:06 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:49201)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <coreutils@HIDDEN>) id 1fe1UD-0007IW-G4
 for bug-coreutils@HIDDEN; Fri, 13 Jul 2018 13:04:06 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <coreutils@HIDDEN>) id 1fe1UC-0002dQ-Jp
 for bug-coreutils@HIDDEN; Fri, 13 Jul 2018 13:04:05 -0400
Received: from ishtar.tlinx.org ([173.164.175.65]:58744
 helo=Ishtar.sc.tlinx.org)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <coreutils@HIDDEN>)
 id 1fe1U7-0002QU-23; Fri, 13 Jul 2018 13:03:59 -0400
Received: from [192.168.3.12] (Athenae [192.168.3.12])
 by Ishtar.sc.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id
 w6DH3ql9056191; Fri, 13 Jul 2018 10:03:54 -0700
Message-ID: <5B48DB78.9060403@HIDDEN>
Date: Fri, 13 Jul 2018 10:03:52 -0700
From: L A Walsh <coreutils@HIDDEN>
User-Agent: Thunderbird
MIME-Version: 1.0
Subject: bug#32127: RFE -- in the way "cp -rl" -- enable 'ln' to do likewise?
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no
 timestamps) [generic] [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -3.8 (---)
X-Debbugs-Envelope-To: submit
Cc: Coreutils <bug-coreutils@HIDDEN>, Coreutils <coreutils@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.8 (----)



-------- Original Message --------
Subject: 	bug#32127: RFE -- in the way "cp -rl" -- enable 'ln' to do 
likewise?
Resent-Date: 	Thu, 12 Jul 2018 07:17:02 +0000
Resent-From: 	L A Walsh <coreutils@HIDDEN>
Resent-CC: 	bug-coreutils@HIDDEN
Date: 	Thu, 12 Jul 2018 00:16:50 -0700
From: 	L A Walsh <coreutils@HIDDEN>
To: 	Paul Eggert <eggert@HIDDEN>
CC: 	32127 <at> debbugs.gnu.org
References: 	<5B465A80.8030104@HIDDEN> 
<a8b9d013-8886-5b8a-741b-50219255f94a@HIDDEN>



Paul Eggert wrote:
> L A Walsh wrote:
>> Like I'll want an "RCS" dir to point to 1 RCS tree -- so I try to use
>> ln <existing RCSdir> <new RCS loc>.  ln, of course seems to think I
>> want the impossible -- and says you can't have hard-linked directories.
> 
> You can use "ln -s" instead of plain "ln". If that's not what you want, then I'm 
> afraid I don't understand what you want, exactly.
---
	Yes, I can retype the command after getting an error telling
me that regular links to directories are invalid.

	I'm asking why does 'ln' bother to tell the user that they are wrong and do nothing useful?  Why not just go ahead and create a symlink -- since it is likely that is what is wanted and is the only type of link that works?

	If needed, it could even tell the user that hard links don't
work so it created a symlink instead.  That way, in the mostly likely case (user wanted a symlink and left off the '-l'), they user would have the symlink created and would not have to re-enter the command.








Information forwarded to bug-coreutils@HIDDEN:
bug#32127; Package coreutils. Full text available.

Message received at 32127 <at> debbugs.gnu.org:


Received: (at 32127) by debbugs.gnu.org; 12 Jul 2018 07:17:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 12 03:17:01 2018
Received: from localhost ([127.0.0.1]:56274 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fdVqW-0005fi-Vp
	for submit <at> debbugs.gnu.org; Thu, 12 Jul 2018 03:17:01 -0400
Received: from ishtar.tlinx.org ([173.164.175.65]:42684
 helo=Ishtar.sc.tlinx.org) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <coreutils@HIDDEN>) id 1fdVqW-0005fY-6i
 for 32127 <at> debbugs.gnu.org; Thu, 12 Jul 2018 03:17:00 -0400
Received: from [192.168.3.12] (Athenae [192.168.3.12])
 by Ishtar.sc.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id
 w6C7Gnp7011705; Thu, 12 Jul 2018 00:16:51 -0700
Message-ID: <5B470062.8070909@HIDDEN>
Date: Thu, 12 Jul 2018 00:16:50 -0700
From: L A Walsh <coreutils@HIDDEN>
User-Agent: Thunderbird
MIME-Version: 1.0
To: Paul Eggert <eggert@HIDDEN>
Subject: Re: bug#32127: RFE -- in the way "cp -rl" -- enable 'ln' to do
 likewise?
References: <5B465A80.8030104@HIDDEN>
 <a8b9d013-8886-5b8a-741b-50219255f94a@HIDDEN>
In-Reply-To: <a8b9d013-8886-5b8a-741b-50219255f94a@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 32127
Cc: 32127 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)



Paul Eggert wrote:
> L A Walsh wrote:
>> Like I'll want an "RCS" dir to point to 1 RCS tree -- so I try to use
>> ln <existing RCSdir> <new RCS loc>.  ln, of course seems to think I
>> want the impossible -- and says you can't have hard-linked directories.
> 
> You can use "ln -s" instead of plain "ln". If that's not what you want, then I'm 
> afraid I don't understand what you want, exactly.
---
	Yes, I can retype the command after getting an error telling
me that regular links to directories are invalid.

	I'm asking why does 'ln' bother to tell the user that they are wrong and do nothing useful?  Why not just go ahead and create a symlink -- since it is likely that is what is wanted and is the only type of link that works?

	If needed, it could even tell the user that hard links don't
work so it created a symlink instead.  That way, in the mostly likely case (user wanted a symlink and left off the '-l'), they user would have the symlink created and would not have to re-enter the command.




Information forwarded to bug-coreutils@HIDDEN:
bug#32127; Package coreutils. Full text available.

Message received at 32127 <at> debbugs.gnu.org:


Received: (at 32127) by debbugs.gnu.org; 11 Jul 2018 20:05:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 11 16:05:34 2018
Received: from localhost ([127.0.0.1]:55936 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fdLMk-0000cW-Lk
	for submit <at> debbugs.gnu.org; Wed, 11 Jul 2018 16:05:34 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:53834)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1fdLMj-0000cH-2F
 for 32127 <at> debbugs.gnu.org; Wed, 11 Jul 2018 16:05:33 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id E0522160F92;
 Wed, 11 Jul 2018 13:05:26 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id nl6tJ3VJVjCx; Wed, 11 Jul 2018 13:05:26 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 33BE7160FAD;
 Wed, 11 Jul 2018 13:05:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id zEB7CNOtFhXl; Wed, 11 Jul 2018 13:05:26 -0700 (PDT)
Received: from [192.168.1.9] (unknown [47.154.30.119])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id E6D9B160F92;
 Wed, 11 Jul 2018 13:05:25 -0700 (PDT)
Subject: Re: bug#32127: RFE -- in the way "cp -rl" -- enable 'ln' to do
 likewise?
To: L A Walsh <coreutils@HIDDEN>, 32127 <at> debbugs.gnu.org
References: <5B465A80.8030104@HIDDEN>
From: Paul Eggert <eggert@HIDDEN>
Openpgp: preference=signencrypt
Autocrypt: addr=eggert@HIDDEN; prefer-encrypt=mutual; keydata=
 xsFNBEyAcmQBEADAAyH2xoTu7ppG5D3a8FMZEon74dCvc4+q1XA2J2tBy2pwaTqfhpxxdGA9
 Jj50UJ3PD4bSUEgN8tLZ0san47l5XTAFLi2456ciSl5m8sKaHlGdt9XmAAtmXqeZVIYX/UFS
 96fDzf4xhEmm/y7LbYEPQdUdxu47xA5KhTYp5bltF3WYDz1Ygd7gx07Auwp7iw7eNvnoDTAl
 KAl8KYDZzbDNCQGEbpY3efZIvPdeI+FWQN4W+kghy+P6au6PrIIhYraeua7XDdb2LS1en3Ss
 mE3QjqfRqI/A2ue8JMwsvXe/WK38Ezs6x74iTaqI3AFH6ilAhDqpMnd/msSESNFt76DiO1ZK
 QMr9amVPknjfPmJISqdhgB1DlEdw34sROf6V8mZw0xfqT6PKE46LcFefzs0kbg4GORf8vjG2
 Sf1tk5eU8MBiyN/bZ03bKNjNYMpODDQQwuP84kYLkX2wBxxMAhBxwbDVZudzxDZJ1C2VXujC
 OJVxq2kljBM9ETYuUGqd75AW2LXrLw6+MuIsHFAYAgRr7+KcwDgBAfwhPBYX34nSSiHlmLC+
 KaHLeCLF5ZI2vKm3HEeCTtlOg7xZEONgwzL+fdKo+D6SoC8RRxJKs8a3sVfI4t6CnrQzvJbB
 n6gxdgCu5i29J1QCYrCYvql2UyFPAK+do99/1jOXT4m2836j1wARAQABzSBQYXVsIEVnZ2Vy
 dCA8ZWdnZXJ0QGNzLnVjbGEuZWR1PsLBfgQTAQIAKAUCTIByZAIbAwUJEswDAAYLCQgHAwIG
 FQgCCQoLBBYCAwECHgECF4AACgkQ7ZfpDmKqfjRRGw/+Ij03dhYfYl/gXVRiuzV1gGrbHk+t
 nfrI/C7fAeoFzQ5tVgVinShaPkZo0HTPf18x6IDEdAiO8Mqo1yp0CtHmzGMCJ50o4Grgfjlr
 6g/+vtEOKbhleszN2XpJvpwM2QgGvn/laTLUu8PH9aRWTs7qJJZKKKAb4sxYc92FehPu6FOD
 0dDiyhlDAq4lOV2mdBpzQbiojoZzQLMQwjpgCTK2572eK9EOEQySUThXrSIz6ASenp4NYTFH
 s9tuJQvXk9gZDdPSl3bp+47dGxlxEWLpBIM7zIONw4ks4azgT8nvDZxA5IZHtvqBlJLBObYY
 0Le61Wp0y3TlBDh2qdK8eYL426W4scEMSuig5gb8OAtQiBW6k2sGUxxeiv8ovWu8YAZgKJfu
 oWI+uRnMEddruY8JsoM54KaKvZikkKs2bg1ndtLVzHpJ6qFZC7QVjeHUh6/BmgvdjWPZYFTt
 N+KA9CWX3GQKKgN3uu988yznD7LnB98T4EUH1HA/GnfBqMV1gpzTvPc4qVQinCmIkEFp83zl
 +G5fCjJJ3W7ivzCnYo4KhKLpFUm97okTKR2LW3xZzEW4cLSWO387MTK3CzDOx5qe6s4a91Zu
 ZM/j/TQdTLDaqNn83kA4Hq48UHXYxcIh+Nd8k/3w6lFuoK0wrOFiywjLx+0ur5jmmbecBGHc
 1xdhAFHOwU0ETIByZAEQAKaF678T9wyH4wjTrV1Pz3cDEoSnV/0ZUrOT37p1dcGyj/IXq1x6
 70HRVahAmk0sZpYc25PF9D5GPYHFWlNjuPU96rDndXB3hedmBRhLdC4bAXjI4DV+bmdVe+q/
 IMnlZRaVlm9EiMCVAR6w13sReu7qXkW9r3RwY2AzXskp/tAe4BRKr1Zmbvi2nbnQ6epEC42r
 Rbx0B1EhjbIQZ5JHGk24iPT7LdBgnNmos5wYjzwNlkMQD5T0Ydzhk7J+UxwA5m46mOhRDC2r
 FV/A0gm5TLy8DXjv/Esc4gYnYai6SQqnUEVh5LuV8YCJBnijs+Tiw71x1icmn6xGI45EugJO
 gec+rLypYgpVp4x0HI5T88qBRYCkxH3Kg8Qo+EWNA9A4LRQ9DX8njona0gf0s03tocK8kBN6
 6UoqqPtHBnc4eMgBymCflK12eKfd2YYxnyg9cZazWA5VslvTxpm76hbg5oiAEH/Vg/8MxHyA
 nPhfrgwyPrmJEcVBafdspJnYQxBYNco2LFPIhlOvWh8r4at+s+M3Lb26oUTczlgdW1Sf3SDA
 77BMRnF0FQyE+7AzV79MBN4ykiqaezQxtaF1Fy/tvkhffSo8u+dwG0EgJh+te38gTcISVr0G
 IPplLz6YhjrbHrPRF1CN5UuL9DBGjxuN35RLNVEfta6RUFlR6NctTjvrABEBAAHCwWUEGAEC
 AA8FAkyAcmQCGwwFCRLMAwAACgkQ7ZfpDmKqfjSrHA/+KzAKvTxRhA9MWNLxIyJ7S5uJ16gs
 T3oCjZrBKGEhKMOGX4O0GA6VOEryO7QRCCYah3oxSG38IAnNeiwJXgU9Bzkk85UGbPEd7HGF
 /VSeHCQwWou6jqUDTSDvn9YhNTdG0KXPM74aC+xr2Zow1O2mhXihgWKD0Dw+0LYPnUOsQ0KO
 FxHXXYHmRrS1OZPU59BLvc+TRhIhafSHKLwbXK+6ckkxBx6h8z5ccpG0Qs4bFhdFYnFrEieD
 LoGmnE2YLhdV6swJ9VNCS6pLiEohT3fm7aXm15tZOIyzMZhHRSAPblXxQ0ZSWjq8oRrcYNFx
 c4W1URpAkBCOYJoXvQfD5L3lqAl8TCqDUzYxhH/tJhbDdHrqHH767jaDaTB1+Talp/2AMKwc
 XNOdiklGxbmHVG6YGl6g8Lrbsu9NZEI4yLlHzuikthJWgz+3vZhVGyNlt+HNIoF6CjDL2omu
 5cEq4RDHM44QqPk6l7O0pUvN1mT4B+S1b08RKpqm/ff015E37HNV/piIvJlxGAYz8PSfuGCB
 1thMYqlmgdhd9/BabGFbGGYHA6U4/T5zqU+f6xHy1SsAQZ1MSKlLwekBIT+4/cLRGqCHjnV0
 q5H/T6a7t5mPkbzSrOLSo4puj+IToNjYyYIDBWzhlA19avOa+rvUjmHtD3sFN7cXWtkGoi8b
 uNcby4U=
Organization: UCLA Computer Science Department
Message-ID: <a8b9d013-8886-5b8a-741b-50219255f94a@HIDDEN>
Date: Wed, 11 Jul 2018 13:05:25 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.8.0
MIME-Version: 1.0
In-Reply-To: <5B465A80.8030104@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 32127
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

L A Walsh wrote:
> Like I'll want an "RCS" dir to point to 1 RCS tree -- so I try to use
> ln <existing RCSdir> <new RCS loc>.=C2=A0 ln, of course seems to think =
I
> want the impossible -- and says you can't have hard-linked directories.

You can use "ln -s" instead of plain "ln". If that's not what you want, t=
hen I'm=20
afraid I don't understand what you want, exactly.




Information forwarded to bug-coreutils@HIDDEN:
bug#32127; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 11 Jul 2018 19:29:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 11 15:29:23 2018
Received: from localhost ([127.0.0.1]:55924 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fdKnj-0008DE-Cq
	for submit <at> debbugs.gnu.org; Wed, 11 Jul 2018 15:29:23 -0400
Received: from eggs.gnu.org ([208.118.235.92]:58005)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <coreutils@HIDDEN>) id 1fdKni-0008D2-3K
 for submit <at> debbugs.gnu.org; Wed, 11 Jul 2018 15:29:22 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <coreutils@HIDDEN>) id 1fdKnc-0000Hv-6s
 for submit <at> debbugs.gnu.org; Wed, 11 Jul 2018 15:29:17 -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.0 required=5.0 tests=BAYES_40 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:57033)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <coreutils@HIDDEN>) id 1fdKnc-0000Hr-3r
 for submit <at> debbugs.gnu.org; Wed, 11 Jul 2018 15:29:16 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:48968)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <coreutils@HIDDEN>) id 1fdKnb-0007Go-47
 for bug-coreutils@HIDDEN; Wed, 11 Jul 2018 15:29:15 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <coreutils@HIDDEN>) id 1fdKnX-0000Dj-W6
 for bug-coreutils@HIDDEN; Wed, 11 Jul 2018 15:29:15 -0400
Received: from ishtar.tlinx.org ([173.164.175.65]:40028
 helo=Ishtar.sc.tlinx.org)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <coreutils@HIDDEN>) id 1fdKnX-0000CN-M4
 for bug-coreutils@HIDDEN; Wed, 11 Jul 2018 15:29:11 -0400
Received: from [192.168.3.12] (Athenae [192.168.3.12])
 by Ishtar.sc.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id
 w6BJT5FZ065077
 for <bug-coreutils@HIDDEN>; Wed, 11 Jul 2018 12:29:07 -0700
Message-ID: <5B465A80.8030104@HIDDEN>
Date: Wed, 11 Jul 2018 12:29:04 -0700
From: L A Walsh <coreutils@HIDDEN>
User-Agent: Thunderbird
MIME-Version: 1.0
To: bug-coreutils@HIDDEN
Subject: RFE -- in the way "cp -rl"  -- enable 'ln' to do likewise?
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no
 timestamps) [generic] [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

If one does a 'cp -rl' -- one gets a coyp of the tree...sorta,
with file hardlinked, and with directories getting their own set
of inodes because:
can't be hardlinked -- so no hardlinking (even if worked, wouldn't make
a separate copy) &&
can't have softlinked dirs, as to softlink something, you need something
to softlink things *to*.  If dirs were softlinked, again, the files
inside would be referenced by the same name-entry in the same real 
directory.

Instead it tries to do a useful think in creating a separate tree with
a fresh set of name entries that point to the same inode-data.

In the same way, I'm often wanting to work on some set of source
files from a different starting location in the source tree.

Like I'll want an "RCS" dir to point to 1 RCS tree -- so I try to use
ln <existing RCSdir> <new RCS loc>.  ln, of course seems to think I
want the impossible -- and says you can't have hard-linked directories.

Instead, just as cp-rl only hard links files while creating new dirs
for directories in the other tree, instead of treating dirs+files the
same, and giving an error message that wouldn't be helpful.


I was wondering if ln dir1 target/ could differentiate and "do what
I meant", and create a softlink rather than giving an error and
requiring me to re enter the command with -l.

I wouldn't be against the idea of it saying that it created a softlink,
but the point it to favor it doing something useful rather than issuing an
error that isn't.

Would that be possible? 
Thanks,  Linda





Acknowledgement sent to L A Walsh <coreutils@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-coreutils@HIDDEN. Full text available.
Report forwarded to bug-coreutils@HIDDEN:
bug#32127; Package coreutils. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 30 Oct 2018 03:45:01 UTC

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