bug-coreutils
[Top][All Lists]
Advanced

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

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


From: Sam James
Subject: bug#62572: cp --no-clobber behavior has changed
Date: Fri, 31 Mar 2023 19:30:47 +0100
User-agent: mu4e 1.8.14; emacs 29.0.60

Alberto Salvia Novella <es20490446e@gmail.com> writes:

> In the past if you did:
> cp --no-clobber $in $out
>
> And "out" existed, "cp" exited with 0. But now, with coreutils 9.2, it
> exists with 1.
>
> Is this on purpose?
>
> (When replying include my email in the field "to", as I'm not subscribed to
> this list)

We hit this in Gentoo at https://bugs.gentoo.org/902751. We concluded
the usage in the ebuild ("build script") was wrong, given that the
coreutils-9.2 NEWS says:
> 'cp -n' and 'mv -n' now exit with nonzero status if they skip their
> action because the destination exists, and likewise for 'cp -i',
> 'ln -i', and 'mv -i' when the user declines.  (POSIX specifies
> this for 'cp -i' and 'mv -i'.)

It still was a bit unexpected though given POSIX doesn't specify -n.

Attachment: signature.asc
Description: PGP signature


reply via email to

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