Subject: Re: bug#10468: BUG: Severe or critical - deletes existing files and leaves nothing. (cp)

From: "Linda Walsh <[email-masked]" <[email-masked]>
Date: Mon, 09 Jan 2012 16:10:05 -0800

Tag EricBlake : a bug

please don't ask that my bugs be closed without looking at what I said.

Eric Blake wrote:
> tag 10468 notabug
> thanks
> 
> On 01/09/2012 02:19 PM, Linda Walsh , <[email-masked]> wrote:
>>
>> I was trying to copy a font dir from a unix to a windows machine.
>> Problem is there are duplicates -- where only the case differs...
>>First I tried:
>>/usr/share/fonts> cp -avu //bliss/usr_share/fonts/. .
>> FAIL
>> ok, at this point, I would consider it 'my bad, for using cp on
>>  windows (it used to work without these issues, not sure what has changed)...
> 
> The problem is not in coreutils, but in your operating system's
> limitations,
---
Can you read?

>>Then I tried the less strict:
>> cp -rvu /usr/share/fonts> cp -rvu //bliss/usr_share/fonts/. . 
>> ALSO FAILED, trying to copy links
---

How is it that it copying the links is not a bug?

I didn't ASK IT to preserve-links

>> Well if I could just get it to copy them and not try to 
>> link them... so it copies them twice..at least they get here...
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>so I try the only thing that might not remove files "n":
>> cp -nrvu //bliss/usr_share/fonts/. .
>> FAIL
===
again, not only did I NOT say preserve links, BUT I asked it not
to clobber files (-n), so again,

Why is it trying to create hard links and deleting files to prepare for this?

I'm aware Windows is case insensitive -- That's not the bug I was
reporting or that you asked closed idjit!

I'm saying I DIDN'T ask it to copy links... so it should simple copied
case variations multiple times to the same target "dumbly" (like it used to).

Now it's "smarter"[sic]. and tries to copy links even when not told
to preserve links.

Can you explain why case insensitivity in the target would cause it
to 'preserve links' when not told to?

If there is a bug in the cygwin code that forces link copying, always,
then I can see that this bug isn't in the 'cp' code, but in code you aren't
mentioning.

But baring that, it looks like 'cp', isnt' doing what it is documented to do --
regardless of case sensitivity.

Also, XFS has a 'case-insensitive' option as well.

You may ask that Windows not be a reason for adding bloat to cp,
but what about a core linux FS?