GNU bug report logs -
#70727
cp doesn't recognize the new --update=none-fail option
Previous Next
Reported by: Attila Fidan <dev <at> print0.net>
Date: Fri, 3 May 2024 04:42:02 UTC
Severity: normal
Done: Pádraig Brady <P <at> draigBrady.com>
Bug is archived. No further changes may be made.
Full log
Message #10 received at 70727-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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.
[cp--update=none-fail.patch (text/x-patch, attachment)]
This bug report was last modified 1 year and 23 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.