emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#70727: closed (cp doesn't recognize the new --update=none-fail optio


From: GNU bug Tracking System
Subject: bug#70727: closed (cp doesn't recognize the new --update=none-fail option)
Date: Fri, 03 May 2024 09:28:01 +0000

Your message dated Fri, 3 May 2024 10:26:40 +0100
with message-id <f967c0ed-7a98-450b-b8a2-c3278a0fcdf5@draigBrady.com>
and subject line Re: bug#70727: cp doesn't recognize the new --update=none-fail 
option
has caused the debbugs.gnu.org bug report #70727,
regarding cp doesn't recognize the new --update=none-fail option
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
70727: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=70727
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: cp doesn't recognize the new --update=none-fail option Date: Fri, 3 May 2024 04:12:34 +0000
Hi,

I wanted to use the new cp --update=none-fail option introduced in 9.5,
but it said "invalid argument ‘none-fail’ for ‘--update’". It turns out
that the commit (49912bac286eb3c0ef7d1567ae790193ad5eb2e8) adding it
forgot to add the new operation to update_type[] and
update_type_string[] in cp.c like it did for mv.c. After patching
coreutils locally the functionality works as expected.

It seems like the test suite didn't catch this because there's no
cp/update.sh test like there is for mv. There's a test for if using
--backup and --update=none-fail are mutually exclusive by checking if cp
returns 1, but an invalid argument also makes cp return 1 :)

I didn't include a patch in case a change to the test suite is wanted,
but the proposed change is tiny and rather obvious.

Thanks!



--- End Message ---
--- Begin Message --- Subject: Re: bug#70727: cp doesn't recognize the new --update=none-fail option Date: Fri, 3 May 2024 10:26:40 +0100 User-agent: Mozilla Thunderbird Beta
On 03/05/2024 05:12, Attila Fidan via GNU coreutils Bug Reports wrote:
Hi,

I wanted to use the new cp --update=none-fail option introduced in 9.5,
but it said "invalid argument ‘none-fail’ for ‘--update’". It turns out
that the commit (49912bac286eb3c0ef7d1567ae790193ad5eb2e8) adding it
forgot to add the new operation to update_type[] and
update_type_string[] in cp.c like it did for mv.c. After patching
coreutils locally the functionality works as expected.

It seems like the test suite didn't catch this because there's no
cp/update.sh test like there is for mv. There's a test for if using
--backup and --update=none-fail are mutually exclusive by checking if cp
returns 1, but an invalid argument also makes cp return 1 :)

I didn't include a patch in case a change to the test suite is wanted,
but the proposed change is tiny and rather obvious.

Well that's embarrassing.
I implemented in cp first, tested that manually,
then must have messed up that hunk when rebasing.

The attached should fix this.

Marking this as done.

thanks,
Pádraig.

Attachment: cp--update=none-fail.patch
Description: Text Data


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]