bug-coreutils@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Attila Fidan via GNU coreutils Bug Reports <bug-coreutils@gnu.org>
To: 70727@debbugs.gnu.org
Subject: bug#70727: cp doesn't recognize the new --update=none-fail option
Date: Fri, 3 May 2024 04:12:34 +0000	[thread overview]
Message-ID: <fguanooj6kb7msml233rcmyiawjp2rckdtlqkrdx6tprfiest7@sbxos2czyo4f> (raw)

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!




             reply	other threads:[~2024-05-03  4:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-03  4:12 Attila Fidan via GNU coreutils Bug Reports [this message]
2024-05-03  9:26 ` bug#70727: cp doesn't recognize the new --update=none-fail option Pádraig Brady

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-coreutils

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fguanooj6kb7msml233rcmyiawjp2rckdtlqkrdx6tprfiest7@sbxos2czyo4f \
    --to=bug-coreutils@gnu.org \
    --cc=70727@debbugs.gnu.org \
    --cc=dev@print0.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).