[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#73865: cp 9.1+ fails to overwrite existing files even with -f under
From: |
Brian . Inglis |
Subject: |
bug#73865: cp 9.1+ fails to overwrite existing files even with -f under Cygwin |
Date: |
Tue, 29 Oct 2024 12:42:45 -0600 |
User-agent: |
Mozilla Thunderbird |
On 2024-10-18 11:32, Paul Eggert wrote:
On 2024-10-18 09:47, Brian Inglis wrote:
Hi folks,
Versions of coreutils cp from 9.1-9.5 have been failing with error message:
"cp: cannot create regular file '/tmp/b/c': File exists"
to overwrite existing files even with -f under Cygwin.
What does strace say?
Thanks Paul,
That made me think to redo and reread the straces and I noticed that the
basename was being accessed in the builddir, as patches were now accessing the
basename not the realpath, so mea culpa!
That required a bunch of rebasing patches, and that now appears to work.
However, I now appear to have the issue that the Cygwin emulated "root" is not
being detected and handled properly, so during tests, chgrp/chown/chmod
--preserve-root is being ignored, also presumably rm!, tests are taking forever,
and all my account and CI system mount points are being trashed by the tests,
and build/gt-preserve-root.sh.XKPb/out is over 1GB!
I take it that should go into a different bug report, as I need to understand
whether any access to "root" is just warned and skipped, or the command is
terminated with prejudice.
The info docs section "Treating ‘/’ specially" appears to be ambiguous about the
ch??? commands, whereas the man pages say "fail to operate recursively on ’/’".
Cygwin would probably want to default these commands to --preserve-root like rm,
and also require -f --force to override, but ch??? redefine -f to --silent --quiet!
--
Take care. Thanks, Brian Inglis Calgary, Alberta, Canada
La perfection est atteinte Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer but when there is no more to cut
-- Antoine de Saint-Exupéry