delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/01/09/16:45:53

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-5.7 required=5.0 tests=AWL,BAYES_05,MISSING_HEADERS,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Message-ID: <4F0B5FF6.8020501@redhat.com>
Date: Mon, 09 Jan 2012 14:45:26 -0700
From: Eric Blake <eblake AT redhat DOT com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0
MIME-Version: 1.0
CC: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: Re: bug#10468: BUG: Severe or critical - deletes existing files and leaves nothing. (cp)
References: <4F0B59EF DOT 7080204 AT tlinx DOT org>
In-Reply-To: <4F0B59EF.7080204@tlinx.org>
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

--------------enig1BC98B7CADE94FA2DC453AC9
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

tag 10468 notabug
thanks

On 01/09/2012 02:19 PM, Linda Walsh , <cygwin AT tlinx.org> wrote:
>=20
>=20
> I was trying to copy a font dir from a unix to a windows machine.
>=20
> Problem is there are duplicates -- where only the case differs...

The problem is not in coreutils, but in your operating system's
limitations, and in your configuration.  Windows (and thus Cygwin) can
be put in a mode where it preserves case (and I highly recommend doing
so if you want your example to work):
http://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-casesensi=
tive

Without that setting, there is nothing that coreutils can do on your
behalf: the default case-insensitive behavior of Windows violates POSIX,
and forcing coreutils to add bloat to work around this violation is
rather difficult and unpalatable compared to all other operating systems
that already follow POSIX.  So I am closing the upstream coreutils bug
report.

There may be a way to make the cygwin port of coreutils smarter about
case-sensitive issues when the Windows setting is case-insensitive, but
it would be specific to the cygwin port.  Meanwhile, I'm not convinced
it is worth slowing down the common case by checking for case clash on
all operations, since most users that either avoid case clash or have
the registry setting on, just to help out the rare case of a user that
has case clash but the registry setting off.  You are more than welcome
to discuss this further on the cygwin list, and preferably provide
patches if you want behavior changed, but again, that would most likely
be cygwin-specific and does not need to involve the upstream coreutils
list (the cygwin port of coreutils already carries several other patches
for dealing with non-POSIX issues that don't need to be ported back
upstream, such as how to handle .exe suffixes).

>> cp -rvu /usr/share/fonts> cp -rvu //bliss/usr_share/fonts/. .
>=20
> figuring without the "-a" it wouldn't try to force linking, thus no
> prob... ... well...
> removed `././OTF/AJensonPro-Bold.otf'
> cp: cannot create hard link `././OTF/AJensonPro-Bold.otf' to
> `././OTF/ajensonpro-bold.otf': No such file or directory
> removed `././OTF/AJensonPro-BoldCapt.otf'
> cp: cannot create hard link `././OTF/AJensonPro-BoldCapt.otf' to
> `././OTF/ajensonpro-boldcapt.otf': No such file or directory
> removed `././OTF/AJensonPro-BoldDisp.otf'
> ------
> ?!!?!   Why is it trying to create hard links again?  I didn't specify
> preserve links!?!
> (i.e. this is a cp BUG...)

If I understand correctly, your problem stems from the fact that your
source location has multiple hard links to the same file but with
different case, while your destination can't support two hard links to
the same file differing only in case, so there is no sane way to say
which of the two spellings should be copied.  It's not cp's fault that
you are copying from a permissive system to a restrictive one; and while
the errors may not be the most friendly, at least they are accurate.

--=20
Eric Blake   eblake AT redhat DOT com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org




--------------enig1BC98B7CADE94FA2DC453AC9
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJPC1/2AAoJEKeha0olJ0NqQ9oH/jM7mR0zvwIISy3VooLQn3Te
NJah7uzbI+sul4Oo3DlzSuo8viS9ToHYUi0wTFLsnPLfGc1nrjUafFeb+OYu4t86
arsngQjqOZTQ6lXiVSQWHu1xqgZP/D9xOJklUijfFn5suTkFViLrZctj2R1KGoDC
JePO6UscPa1KMTvCx+nsIsOoM9YIWJBWEwskWeFA1ea0krqaA/5KCeybLQvyCBOT
lHYY4XLxOPIc9l6wKIi9Y6xElq7LFyjL9P37gFtocmmo0BqdLZ1Rhvep94IpP/YI
K7CZcZ/0HBi9ySwN2HTVaXFYrKHBGOq3XKanQF9xykaOhO5DhPRdfzil1agHViU=
=D9NG
-----END PGP SIGNATURE-----

--------------enig1BC98B7CADE94FA2DC453AC9--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019