bug-coreutils
[Top][All Lists]
Advanced

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

Fwd: [PATCH] make "cp -i -f" behaves like "cp -f" instead of like "cp -i


From: Eric Blake
Subject: Fwd: [PATCH] make "cp -i -f" behaves like "cp -f" instead of like "cp -i"
Date: Wed, 30 Aug 2006 20:29:25 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.5) Gecko/20060719 Thunderbird/1.5.0.5 Mnenhy/0.7.4.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Forwarding this to the mailing list, so this exchange gets archived:

> -------- Original Message --------
> Subject: [PATCH] make "cp -i -f" behaves like "cp -f" instead of like
"cp -i"
> Date: Thu, 31 Aug 2006 00:33:31 +0200
> From: Thierry Vignaud
> Organization: Mandriva
>
> Hi,
>
> I posted the following patch on savannah as #5351 but for some reason,
> it doesn't appear in coreutils patch list, hence this mail.
>
> The following patch makes now "cp -i -f" behaves like "cp -f" instead
> of like "cp -i".
>
> We think that behavior is what end users would predict.

Thanks for the effort, but POSIX requires the current behavior:
http://www.opengroup.org/onlinepubs/009695399/nframe.html
especially step 3a, where -i must be handled before -f.

>
> Note that if accepted, the testsuite would have to be sightly altered.
>

Perhaps you could introduce a dependence on POSIXLY_CORRECT,
although the trend has been to avoid things like this because they
are harder to maintain, and have -f override -i only when not
POSIXLY_CORRECT.  But you would also do better to provide a complete
patch, including test suite changes, NEWS entry, and texinfo updates,
before your patch would be accepted.  And at that point, the patch
would probably be non-trivial enough to warrant an exchange of
copyright papers.  One other thing: make your patch against CVS
head, not 5.93 (5.97 is the latest stable release, and 6.1 has already
been released as a beta).  But because of POSIX, I doubt this
patch will go very far, because there are probably scripts out in
the wild that depend on the current behavior, whether or not it
is intuitive to the end user.

- --
Life is short - so eat dessert first!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFE9kmE84KuGfSFAYARAkhrAKCLenXz0VySgHQcMFe8sXWPE5vIlQCeKoST
DWu8EG90gIcTS15osIOTYd4=
=KIKG
-----END PGP SIGNATURE-----
--- ./src/cp.c.orig     2005-09-16 09:50:33.000000000 +0200
+++ ./src/cp.c  2005-11-14 17:09:11.000000000 +0100
@@ -848,6 +848,7 @@
          break;
 
        case 'f':
+         x.interactive = 0;
          x.unlink_dest_after_failed_open = true;
          break;
 


reply via email to

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