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

Previous Next

Package: coreutils;

Reported by: L A Walsh <coreutils <at> tlinx.org>

Date: Wed, 11 Jul 2018 19:30:02 UTC

Severity: wishlist

Full log


View this message in rfc822 format

From: L A Walsh <coreutils <at> tlinx.org>
To: Bernhard Voelker <mail <at> bernhard-voelker.de>
Cc: eggert <at> cs.ucla.edu, 32127 <at> debbugs.gnu.org, coreutils <at> gnu.org
Subject: bug#32127: RFE -- in the way "cp -rl" -- enable 'ln' to do likewise?
Date: Tue, 17 Jul 2018 01:25:59 -0700

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.





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

Previous Next


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