GNU bug report logs - #62572
cp --no-clobber behavior has changed

Previous Next

Package: coreutils;

Reported by: Alberto Salvia Novella <es20490446e <at> gmail.com>

Date: Fri, 31 Mar 2023 17:49:01 UTC

Severity: normal

Full log


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

From: Michael Stone <mstone <at> debian.org>
To: Pádraig Brady <P <at> draigbrady.com>
Cc: 1058752 <at> bugs.debian.org, 62572 <at> debbugs.gnu.org
Subject: Re: bug#62572: cp --no-clobber behavior has changed
Date: Fri, 15 Dec 2023 13:49:59 -0500
On Fri, Dec 15, 2023 at 06:33:00PM +0000, Pádraig Brady wrote:
>Advantages of leaving as is:
>We get consistency of "noclobber" behavior across systems / shells.

You don't, unless you ignore the coreutils/linux installed base 
entirely. Essentially the current situation is that -n shouldn't be used 
if you expect a certain behavior for this case and you are writing a 
script for linux systems. Maybe in 10 years you'll be able to assume 
the new behavior. Better to just tell people to not use it at all, and 
leave the historic behavior alone until everyone has stopped using -n 
entirely.

>There is no potential for data loss etc.

There may not be, strictly speaking, if you look only at cp without 
context, but we have absolutely no idea what the impact is on the 
unknown number of existing scripts that depend on the historic behavior. 
This is causing breakages in practice.

>so it just comes
>down to how disruptive it is, or how often -n was used
>with the "skip behavior" assumption.

IMO, it should come down to trying to avoid breaking changes in core 
system utilities. There's no compelling reason to force this change, so 
why break anything that depended on the historic behavior--especially 
without any notice or transition period--regardless of arguments over 
whether the historic behavior was right?

>We've not had much push back as of yet,
>and my current thinking is it's not that disruptive a change.

I suspect that's because it has not yet been widely deployed, which 
makes now the time to fix it.

Michael Stone




This bug report was last modified 1 year and 175 days ago.

Previous Next


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