emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#10468: closed (BUG: Severe or critical - deletes e


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#10468: closed (BUG: Severe or critical - deletes existing files and leaves nothing. (cp))
Date: Tue, 10 Jan 2012 01:02:02 +0000

Your message dated Mon, 09 Jan 2012 17:00:40 -0800
with message-id <address@hidden>
and subject line Re: bug#10468: BUG: Severe or critical - deletes existing 
files and leaves nothing. (cp)
has caused the debbugs.gnu.org bug report #10468,
regarding BUG: Severe or critical - deletes existing files and leaves nothing. 
(cp)
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
10468: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10468
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: BUG: Severe or critical - deletes existing files and leaves nothing. (cp) Date: Mon, 09 Jan 2012 13:19:43 -0800 User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.24) Gecko/20100228 Lightning/0.9 Thunderbird/2.0.0.24 Mnenhy/0.7.6.666


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...

On unix, I've run a 'dedup' in my font dir, that joined any files that were the
same so they are hard links to each other. (made sense at the time... ;-) ).

windows treats different cased file names as the same.

Along comes cp, on cygwin, .. but I don't think this is a cygwin bug, as
it's doing what it is supposed to do.. it is cp  that is problematic.

Note, in the below, I an alias for cp is in effect:

alias cp='cp --preserve=mode,timestamps'

i.e. by default, I try to preserve 'simple'-permissions, and timestamps.


First I tried:

/usr/share/fonts> cp -avu //bliss/usr_share/fonts/. .


Got:

removed `././Adobe (afm) fonts/Symbol.afm'
cp: cannot create hard link `././Adobe (afm) fonts/Symbol.afm' to `././Adobe (afm) fonts/symbol.afm': No such file or directory
removed `././Adobe (afm) fonts/cmr10.afm'
cp: cannot create hard link `././Adobe (afm) fonts/cmr10.afm' to `././Adobe (afm) fonts/CMR10.afm': No such file or directory
removed `././Adobe (afm) fonts/cmex10.afm'
(and many more... )

It removes an existing file 'Symbol', because because it sees that 'Symbol' is 
not
a hard link to 'symbol'; I specified "-a" to make an exact copy, so it's trying to copy links.

But by removing 'Symbol', it removes 'symbol' and THEN can't link to it...
thus 'symbol' is gone from the local dir.
---
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)...


Then I tried the less strict:

cp -rvu /usr/share/fonts> cp -rvu //bliss/usr_share/fonts/. .

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...)


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/. .

and...

removed `././Adobe (afm) fonts/cmbx5.afm'
cp: cannot create hard link `././Adobe (afm) fonts/cmbx5.afm' to `././Adobe (afm) fonts/CMBX5.afm': No such file or directory
removed `././Adobe (afm) fonts/cmbx7.afm'
cp: cannot create hard link `././Adobe (afm) fonts/cmbx7.afm' to `././Adobe (afm) fonts/CMBX7.afm': No such file or directory
removed `././Adobe (afm) fonts/cmmi10.afm'

... *sigh*...
my poor cumberland fonts... so sad!
um.... hey, if it shouldn't have removed them on -rvu, it doubly shouldn't have done so on
when I told it "-n" (--no-clobber) don't clobber existing files...



DOUBLE BUG!....

 cygcheck -f /bin/cp
coreutils-8.14-1







--- End Message ---
--- Begin Message --- Subject: Re: bug#10468: BUG: Severe or critical - deletes existing files and leaves nothing. (cp) Date: Mon, 09 Jan 2012 17:00:40 -0800 User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.24) Gecko/20100228 Lightning/0.9 Thunderbird/2.0.0.24 Mnenhy/0.7.6.666


Eric Blake wrote:
[dropping cygwin - this part of my response is specific to upstream
coreutils]

On 01/09/2012 05:10 PM, Linda Walsh <address@hidden wrote:
The problem is not in coreutils, but in your operating system's
limitations,
---
Can you read?

Yes, which is why I wrote the reply that I did, after reading your full
mail.  I was not outright dismissing your bug report, I was just merely
closing the upstream coreutils instance of it, and trying to redirect
the conversation to a more appropriate location (the cygwin mail for
your bug report is still very much open, and I hope to reply more on
that thread).  I'm not trying to insult you, although I can see how my
mail may have come across in that manner, so I apologize if that has
happened.  But please, return the favor and give me the benefit of a
doubt as well, rather than escalating this into a battle of name-calling.

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

Are you sure you don't have a shell alias or function for cp that is
adding options you did not type on the command line?  What does 'type
cp' output for you?
----
        This is further evidence that you closed the bug before
reading it.

        as:
type cp
cp is aliased to `cp --preserve=mode,timestamps'

Was listed as being the case BEFORE the first test case...



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,

Your behavior sounds an awful lot like you have an alias which is
including other options, perhaps -f, in what is actually being passed to
cp, compounded by the fact that creating a file by one spelling makes it
appear as if the other spelling is already present.

Um.... Quoting from the original bug report:
   "Note, in the below, I an alias for cp is in effect:
    alias cp='cp --preserve=mode,timestamps'"
---
Before the first example.

It DOESN'T say to preserve links. it doesn't say '-f'

I'm aware Windows is case insensitive

That's not quite what I said - I said that Windows can be configured to
be case-sensitive, and that when you have a situation with case clashes,
you may be better off turning that configuration bit before reporting a
bug.  And since it is not the default for Windows, I'm not sure if you
are aware that Windows can be case sensitive,
----
Yes I am aware... I would make linux case insensitive, if it had the
option.

Examples -- some linux's now find packages and man pages, even if you
don't have the caPitAliZatioN exactly the way someone  thought should be
capitalized.


 and that my suspicion is
that using Windows in a case-sensitive manner would have avoided your
problems in the first place.
----
Nope...

just the opposite... pressing 'shift' causes more wear and tear on my
hands... exacerbates RSI -- which has caused nerve damage, causing
my fingers to be less coordinated -- such that it is harder for me to
precisely control the order of how keys are entered -- such as SHIFT and some
letter at the same time.


And as I said in another mail, if you can demonstrate this problem with
upstream coreutils on a Linux kernel and XFS file system, with cygwin
completely removed from the mix

---

Um, excuse me, but cp is a gnu util, not part of linux, -- you should
demonstrate that it is not a bug in cygwin, as adding the linux kernel
to the mix, is another piece of software...

If you want your pure test case, go scrape up a working test case on
Hurd, don't be pretending that Linus is GNU...



--- End Message ---

reply via email to

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