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 #23 received at 62572 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Sven Joachim <svenjoac <at> gmx.de>
Cc: Alberto Salvia Novella <es20490446e <at> gmail.com>, 62572 <at> debbugs.gnu.org
Subject: Re: bug#62572: cp --no-clobber behavior has changed
Date: Fri, 31 Mar 2023 14:15:47 -0700
On 2023-03-31 13:37, Sven Joachim wrote:
> On 2023-03-31 13:01 -0700, Paul Eggert wrote:
> 
>> part of the idea was to let shell programmers easily test whether
>> cp successfully copied the data.
> 
> By making them stop using the '-n' option, since they cannot rely on the
> exit code anyway?

Portable code could not rely on the exit status anyway, as FreeBSD cp 
agrees with the new GNU behavior, not the old. See:

https://bugs.gnu.org/61105

It was a messy situation where there was no perfect solution. That being 
said, there is an advantage of consistency with FreeBSD, and the new GNU 
behavior does avoid the race mentioned in Bug#61105.




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.