GNU bug report logs - #61386
[PATCH] cp,mv,install: Disable sparse copy on macOS

Previous Next

Package: coreutils;

Reported by: George Valkov <gvalkov <at> gmail.com>

Date: Thu, 9 Feb 2023 09:36:03 UTC

Severity: normal

Tags: patch

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: George Valkov <gvalkov <at> gmail.com>, Pádraig Brady <P <at> draigBrady.com>
Cc: 61386 <at> debbugs.gnu.org
Subject: bug#61386: [PATCH] cp,mv,install: Disable sparse copy on macOS
Date: Sat, 11 Feb 2023 10:19:55 -0800
On 2023-02-10 17:27, George Valkov wrote:
> I’d prefer a timestamp consistent with source.

You can get that with 'cp -p' (or with 'cp --preserve=timestamps' etc.). 
So this is not an issue of whether you can get what you prefer. It's 
merely an issue about what cp's default behavior is, when the user 
doesn't specify options.

POSIX is reasonably clear that if you use plain cp to create a file, the 
file's last-modified time should be the current time. And it's not just 
a question of standards conformance: lots of real-world uses of 'cp' 
expect this behavior. For example, people use plain 'cp' in Makefiles, 
and 'make' relies on the last-modified time being the current time. If 
cp changed this behavior, it'd break a lot of builds.




This bug report was last modified 2 years and 123 days ago.

Previous Next


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