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

2024-02-24 Thread Pádraig Brady
On 01/02/2024 00:36, Paul Eggert wrote: On 1/31/24 06:06, Pádraig Brady wrote: To my mind the most protective option takes precedence. That's not how POSIX works with mv -i and mv -f. The last flag wins. I assume this is so that people can have aliases or shell scripts that make -i the

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

2024-01-31 Thread Paul Eggert
On 1/31/24 06:06, Pádraig Brady wrote: To my mind the most protective option takes precedence. That's not how POSIX works with mv -i and mv -f. The last flag wins. I assume this is so that people can have aliases or shell scripts that make -i the default, but you can override by specifying

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

2024-01-31 Thread Pádraig Brady
On 30/01/2024 18:31, Paul Eggert wrote: On 2024-01-30 03:18, Pádraig Brady wrote: So we now have the proposed change as:   - revert -n to old silent success behavior   - document -n as deprecated   - Leave --update=none as is (will be synonymous with -n)   - Provide --update=none-fail

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

2024-01-30 Thread Paul Eggert
On 2024-01-30 03:18, Pádraig Brady wrote: So we now have the proposed change as:   - revert -n to old silent success behavior   - document -n as deprecated   - Leave --update=none as is (will be synonymous with -n)   - Provide --update=none-fail to diagnose and exit failure Thanks, that's

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

2024-01-30 Thread Pádraig Brady
On 29/01/2024 21:44, Paul Eggert wrote: On 1/29/24 08:11, Pádraig Brady wrote: Right, that's why I'm still leaning towards my proposal in the last mail. Well, I won't insist on doing nothing; however, the proposal needs ironing out and now's a good time to do it before installing changes.

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

2024-01-29 Thread Paul Eggert
On 1/29/24 08:11, Pádraig Brady wrote: Right, that's why I'm still leaning towards my proposal in the last mail. Well, I won't insist on doing nothing; however, the proposal needs ironing out and now's a good time to do it before installing changes.   - revert to previous exit success

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

2024-01-29 Thread Michael Stone
On Mon, Jan 29, 2024 at 04:11:05PM +, Pádraig Brady wrote: You've introduced a silent incompatibility and I'm trying to find some way to make that clear. If upstream would provide a better solution I would certainly use it. I have despaired of there being such since your attitude thus far

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

2024-01-29 Thread Pádraig Brady
On 29/01/2024 14:01, Michael Stone wrote: On Sun, Jan 28, 2024 at 11:14:14PM -0800, Paul Eggert wrote: I'm not sure reverting would be best. It would introduce more confusion, and would make coreutils incompatible with FreeBSD again. Reverting makes more sense than the current situation. I do

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

2024-01-29 Thread Michael Stone
On Sun, Jan 28, 2024 at 11:14:14PM -0800, Paul Eggert wrote: I'm not sure reverting would be best. It would introduce more confusion, and would make coreutils incompatible with FreeBSD again. Reverting makes more sense than the current situation. I do not understand why you seem to value

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

2024-01-28 Thread Paul Eggert
On 2024-01-28 05:22, Pádraig Brady wrote: At this stage it seems best for us go back to the original Linux behiavor (use case 3), and to silently deprecate -n in docs to document the portability issues with it. I'm not sure reverting would be best. It would introduce more confusion, and

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

2023-12-17 Thread Pádraig Brady
On 16/12/2023 21:46, Bernhard Voelker wrote: On 12/15/23 21:13, Michael Stone wrote: On Fri, Dec 15, 2023 at 11:21:06AM -0800, Paul Eggert wrote: Stlll, Pádraig gave a reasonable summary of why the change was made, To clarify my summary a little, there I said that -n now _immediately_ fails.

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

2023-12-17 Thread Michael Stone
On Sun, Dec 17, 2023 at 12:34:11AM -0800, Paul Eggert wrote: On 2023-12-16 13:46, Bernhard Voelker wrote: Whether the implementation is race-prone or not is an internal thing. I wasn't referring to the internal implementation. I was referring to cp users. With the newer Coreutils (FreeBSD)

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

2023-12-17 Thread Dominique Martinet
Paul Eggert wrote on Fri, Dec 15, 2023 at 11:21:06AM -0800: > The cat is to some extent out of the bag. Unless one insists on (FreeBSD | > coreutils 9.2-9.4), or insist on coreutils 7.1-9.1, one should not rely on > cp -n failing or silently succeeding when the destination already exists. > This

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

2023-12-17 Thread Paul Eggert
On 2023-12-16 13:46, Bernhard Voelker wrote: Whether the implementation is race-prone or not is an internal thing. I wasn't referring to the internal implementation. I was referring to cp users. With the newer Coreutils (FreeBSD) behavior, you can reliably write a script to do something if

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

2023-12-15 Thread Michael Stone
On Fri, Dec 15, 2023 at 11:21:06AM -0800, Paul Eggert wrote: Stlll, Pádraig gave a reasonable summary of why the change was made, despite its incompatibility with previous behavior. (One thing I'd add is that the FreeBSD behavior is inherently less race-prone.) It seemed like a good idea at

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

2023-12-15 Thread Paul Eggert
On 2023-12-15 10:49, Michael Stone wrote: There's no compelling reason to force this change Well, certainly nobody compelled us at gunpoint Stlll, Pádraig gave a reasonable summary of why the change was made, despite its incompatibility with previous behavior. (One thing I'd add is that

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

2023-12-15 Thread Michael Stone
On Fri, Dec 15, 2023 at 06:33:00PM +, Pádraig Brady wrote: Advantages of leaving as is: We get consistency of "noclobber" behavior across systems / shells. You don't, unless you ignore the coreutils/linux installed base entirely. Essentially the current situation is that -n shouldn't be

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

2023-12-15 Thread Pádraig Brady
On 15/12/2023 15:56, Michael Stone wrote: I tend to think this was a serious mistake: it breaks the behavior of existing scripts with no deprecation period. A stated advantage is better compatibility with freebsd, but I don't understand why that is more desirable than compatibility with all