GNU bug report logs - #62608
cp --recursive --backup broken in 9.2

Previous Next

Package: coreutils;

Reported by: Kristian Klausen <kristian <at> klausen.dk>

Date: Sun, 2 Apr 2023 04:48:04 UTC

Severity: normal

To reply to this bug, email your comments to 62608 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#62608; Package coreutils. (Sun, 02 Apr 2023 04:48:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kristian Klausen <kristian <at> klausen.dk>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Sun, 02 Apr 2023 04:48:04 GMT) Full text and rfc822 format available.

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

From: Kristian Klausen <kristian <at> klausen.dk>
To: bug-coreutils <at> gnu.org
Subject: cp --recursive --backup broken in 9.2
Date: Sun, 2 Apr 2023 01:01:05 +0200
[Message part 1 (text/plain, inline)]
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 (No such file or 
directory)

In coreutils 9.1-3 the syscall succeeds:
renameat2(4, "bar", 4, "bar~", 0)       = 0

I assume renameat2 is called with the wrong oldpath and newpath in 9.2 
and that it should just be the basename and not the full relative path.

Cheers
Kristian Klausen

[OpenPGP_signature (application/pgp-signature, attachment)]

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

Previous Next


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