bug#62608: cp --recursive --backup broken in 9.2

2023-04-01 Thread Kristian Klausen via GNU coreutils Bug Reports
Hi After upgrading to coreutils 9.2-2 on Arch Linux the following: mkdir -p src dst touch {src,dst}/bar cp --recursive --backup src/* dst fails with: cp: cannot create regular file 'dst/foo/bar': File exists Running strace on cp I noticed: renameat2(4, "foo/bar", 4, "foo/bar~", 0) = -1 ENOENT (N

bug#62607: cp --recursive --backup broken in 9.2

2023-04-01 Thread Kristian Klausen via GNU coreutils Bug Reports
Hi After upgrading to coreutils 9.2-2 on Arch Linux the following: mkdir -p src dst touch {src,dst}/bar cp --recursive --backup src/* dst fails with: cp: cannot create regular file 'dst/foo/bar': File exists Running strace on cp I noticed: renameat2(4, "foo/bar", 4, "foo/bar~", 0) = -1 ENOENT (N

bug#62572: cp --no-clobber behavior has changed

2023-04-01 Thread Paul Eggert
On 2023-04-01 08:44, Pádraig Brady wrote: OK first stab at --update=none support is attached. Thanks, some comments: + /* Always Overwrite. */ + UPDATE_OVERWRITE, Might be better to call this UPDATE_ALL as it doesn't overwrite if you use cp -l or -s or (in some cases) --preserve=links

bug#62572: cp --no-clobber behavior has changed

2023-04-01 Thread Alberto Salvia Novella
Maybe simpler: -m --missing Only copy non existing files. On Sat, 1 Apr 2023 at 17:44, Pádraig Brady wrote: > On 01/04/2023 00:29, Paul Eggert wrote: > > On 2023-03-31 14:32, Pádraig Brady wrote: > > > >> Perhaps we should support: > >> --no-clobber[={skip, fail (default)}] > >> > >> so the

bug#62572: cp --no-clobber behavior has changed

2023-04-01 Thread Pádraig Brady
On 01/04/2023 00:29, Paul Eggert wrote: On 2023-03-31 14:32, Pádraig Brady wrote: Perhaps we should support:   --no-clobber[={skip, fail (default)}] so then users can at least easily change -n to --no-clobber=skip to get the old behavior? An alternative would be to augment the --update opti

bug#62572: cp --no-clobber behavior has changed

2023-04-01 Thread Pádraig Brady
On 01/04/2023 15:46, Alberto Salvia Novella wrote: Also there's now a bigger problem: that you cannot tell when the copy failed because the file exists, or because any other reason. People will just use: cp --no-clover $in $out || true But if it fails for any other reason, cross your fingers.

bug#62572: cp --no-clobber behavior has changed

2023-04-01 Thread Alberto Salvia Novella
Also there's now a bigger problem: that you cannot tell when the copy failed because the file exists, or because any other reason. People will just use: cp --no-clover $in $out || true But if it fails for any other reason, cross your fingers. Hence now the option, in practice, is useless. Nobody