bug-fileutils
[Top][All Lists]
Advanced

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

Change in behavior for cp in fileutils-4.1.1


From: Vin Shelton
Subject: Change in behavior for cp in fileutils-4.1.1
Date: 13 Nov 2001 20:03:52 -0500

Hello,
    In fileutils-4.1, if a file is listed twice in the source list, cp
copies the file twice, overwriting the first copy.  In
fileutils-4.1.1, cp generates an error, even if the -f flag has been
specified:

in fileutils-4.1.1:
  $ touch baz
  $ mkdir blurfl
  $ /usr/local/bin/cp --version
  cp (fileutils) 4.1.1
  Written by Torbjorn Granlund, David MacKenzie, and Jim Meyering.

  Copyright (C) 2001 Free Software Foundation, Inc.
  This is free software; see the source for copying conditions.  There is NO
  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  $ /usr/local/bin/cp baz baz blurfl
  /usr/local/bin/cp: will not overwrite just-created `blurfl/baz' with `baz'
  $ /usr/local/bin/cp -f baz baz blurfl
  /usr/local/bin/cp: will not overwrite just-created `blurfl/baz' with `baz'

in fileutils-4.1:
  $ /bin/cp --version
  cp (fileutils) 4.1
  Written by Torbjorn Granlund, David MacKenzie, and Jim Meyering.

  Copyright (C) 2001 Free Software Foundation, Inc.
  This is free software; see the source for copying conditions.  There is NO
  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  $ /bin/cp baz baz blurfl
  $ echo $?
  0

I did not find this change mentioned in the NEWS file.  This change
will likely break some scripts and makefiles which utilize the old
'feature'; I discovered it when building the XEmacs packages
hierarchy, which contains makefiles which (admittedly sloppily) use
macros to supply overlapping lists of source files for cp to copy.

Regards,
  Vin Shelton



reply via email to

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