Re: 'cp' utility bug when .exe file exist.

2010-06-11 Thread Christopher Faylor
On Fri, Jun 11, 2010 at 01:32:48PM -0500, Nellis, Kenneth wrote: >> From: Larry Hall (Cygwin) >> Sent: Friday, June 11, 2010 14:01 >> To: cygwin >> Subject: Re: 'cp' utility bug when .exe file exist. You are inexplicably duplicating the header of the message in the body of the message,

Re: 'cp' utility bug when .exe file exist.

2010-06-11 Thread Larry Hall (Cygwin)
On 6/11/2010 2:32 PM, Nellis, Kenneth wrote: ... The link refers us to the "(no)transparent_exe" CYGWIN option with the following explanation: This option has been removed because the behaviour it switched on is now the standard behaviour in Cygwin. This seems to presume that the

RE: 'cp' utility bug when .exe file exist.

2010-06-11 Thread Nellis, Kenneth
> From: Larry Hall (Cygwin) > Sent: Friday, June 11, 2010 14:01 > To: cygwin@cygwin.com > Subject: Re: 'cp' utility bug when .exe file exist. > > On 6/11/2010 1:46 PM, Steven Collins wrote: > > On Fri, Jun 11, 2010 at 08:38, Nellis, Kenneth wrote: > >> Perhaps it's worth considering add

Re: 'cp' utility bug when .exe file exist.

2010-06-11 Thread Julio Costa
On Wed, Jun 9, 2010 at 20:49, Christopher Faylor wrote: > On Wed, Jun 09, 2010 at 05:28:16PM +0100, Julio Costa wrote: >>On Wed, Jun 9, 2010 at 16:47, Christopher Faylor wrote: >>> On Wed, Jun 09, 2010 at 03:02:16PM +0100, Julio Costa wrote: On Wed, Jun 9, 2010 at 14:20, Eric Blake wrote: >

Re: 'cp' utility bug when .exe file exist.

2010-06-11 Thread Julio Costa
On Thu, Jun 10, 2010 at 11:10, Andrey Repin wrote: > Greetings, Julio Costa! > Hi, Andrey! And this is where my head got reeeally spinning... can anyone, please, explain the reason to why this .exe magic exists, anyway? >>> >>> It's already been explained in this very thread. >>> > >> I'm

Re: 'cp' utility bug when .exe file exist.

2010-06-10 Thread Andrey Repin
Greetings, Eric Blake! > Meanwhile, we can't get away from .lnk magic, but that produces orders > of magnitude less complaints on the list, so I'm not as worried about it. .lnk works just fine without extension. And easily distinguishable from first few bytes read. -- WBR, Andrey Repin (anrdae

Re: 'cp' utility bug when .exe file exist.

2010-06-10 Thread Andrey Repin
Greetings, Julio Costa! >And this is where my head got reeeally spinning... can anyone, please, >explain the reason to why this .exe magic exists, anyway? >> >> As far as I understand it, the original reason for it was that Windows >> 9x always required it. Of course Cygwin 1.7 no longer s

Re: 'cp' utility bug when .exe file exist.

2010-06-10 Thread Andrey Repin
Greetings, Julio Costa! >>>And this is where my head got reeeally spinning... can anyone, please, >>>explain the reason to why this .exe magic exists, anyway? >> >> It's already been explained in this very thread. >> > I'm must be getting pretty dense. > The only explanation I already had seen wa

Re: 'cp' utility bug when .exe file exist.

2010-06-09 Thread Christopher Faylor
On Wed, Jun 09, 2010 at 11:51:14AM -0400, Christopher Faylor wrote: >On Wed, Jun 09, 2010 at 10:50:34AM -0400, Stephen Morton wrote: >>We use a make environment that is part cygwin and part pure windows >>executables (long story). And it all works in linux too. I suspect >>it would break in the wor

Re: 'cp' utility bug when .exe file exist.

2010-06-09 Thread Christopher Faylor
On Wed, Jun 09, 2010 at 05:28:16PM +0100, Julio Costa wrote: >On Wed, Jun 9, 2010 at 16:47, Christopher Faylor wrote: >> On Wed, Jun 09, 2010 at 03:02:16PM +0100, Julio Costa wrote: >>>On Wed, Jun 9, 2010 at 14:20, Eric Blake wrote: Have you ever encountered a makefile that doesn't consis

Re: 'cp' utility bug when .exe file exist.

2010-06-09 Thread Dave Korn
On 09/06/2010 15:14, Eric Blake wrote: > However, I'm starting to like the idea, if we can get buy-in from the > gcc packager. Dave? Yeh, sure, it's a trivial change; there's no trouble making the compiler do whatever we decide is the distro standard. I have no particular opinion on the matte

Re: 'cp' utility bug when .exe file exist.

2010-06-09 Thread Julio Costa
On Wed, Jun 9, 2010 at 16:51, Christopher Faylor wrote: > On Wed, Jun 09, 2010 at 10:50:34AM -0400, Stephen Morton wrote: >>We use a make environment that is part cygwin and part pure windows >>executables (long story). And it all works in linux too. I suspect >>it would break in the worst ugly way

Re: 'cp' utility bug when .exe file exist.

2010-06-09 Thread Michael Ludwig
Oleksandr Gavenko schrieb am 08.06.2010 um 16:47 (+0300): > $ touch my.exe > $ touch some-file > $ cp some-file my > cp: cannot create regular file `my': File exists > $ cp -f some-file my > cp: cannot create regular file `my': File exists > > Same happen ever in cmd.exe so this is not 'ba

Re: 'cp' utility bug when .exe file exist.

2010-06-09 Thread Julio Costa
On Wed, Jun 9, 2010 at 16:47, Christopher Faylor wrote: > On Wed, Jun 09, 2010 at 03:02:16PM +0100, Julio Costa wrote: >>On Wed, Jun 9, 2010 at 14:20, Eric Blake wrote: >>> >>> Have you ever encountered a makefile that doesn't consistently use >>> $(EXEEXT) everywhere? ??Too many people just expect

Re: 'cp' utility bug when .exe file exist.

2010-06-09 Thread Christopher Faylor
On Wed, Jun 09, 2010 at 10:50:34AM -0400, Stephen Morton wrote: >We use a make environment that is part cygwin and part pure windows >executables (long story). And it all works in linux too. I suspect >it would break in the worst ugly ways if the .exe magic did not exist. And, it is this kind of t

Re: 'cp' utility bug when .exe file exist.

2010-06-09 Thread Christopher Faylor
On Wed, Jun 09, 2010 at 03:02:16PM +0100, Julio Costa wrote: >On Wed, Jun 9, 2010 at 14:20, Eric Blake wrote: >> >> Have you ever encountered a makefile that doesn't consistently use >> $(EXEEXT) everywhere? ??Too many people just expect 'gcc -o foo ...' to >> produce foo, then 'strip foo' to work,

Re: 'cp' utility bug when .exe file exist.

2010-06-09 Thread Julio Costa
On Wed, Jun 9, 2010 at 15:28, Corinna Vinschen wrote: > On Jun  9 08:14, Eric Blake wrote: >> On 06/09/2010 08:08 AM, Andy Koppe wrote: >> >>> More importantly, a lot of build scripts likely depend on the .exe being >> >>> added automatically. >> >> >> >> Hm. Maybe they shouldn't. >> > >> > Yeah,

Re: 'cp' utility bug when .exe file exist.

2010-06-09 Thread Eliot Moss
So if you're going to do this crazy thing, you've got to be prepared to accommodate Windows's various quirks, one of which is this .com .exe and .lnk business. I think that it would still be possible to have cygwin look for foo.exe when searching for an executable and it does not find foo. But

Re: 'cp' utility bug when .exe file exist.

2010-06-09 Thread Stephen Morton
Eric Blake wrote: > Alexander T wrote: > > > Why not just do the exe magic for executing the files only? When > > opening, stating, copying, moving etc, you could leave it out. This > > seems the most reasonable compromise to me, but there could of course > > be cases which I am overseeing, but I w

Re: 'cp' utility bug when .exe file exist.

2010-06-09 Thread Eliot Moss
On 6/9/2010 10:29 AM, Eliot Moss wrote: On 6/9/2010 10:14 AM, Eric Blake wrote: On 06/09/2010 08:08 AM, Andy Koppe wrote: But even with that gcc change, we'd have to keep .exe magic in cygwin1.dll until everything in the distro has been rebuilt without an .exe suffix. Maybe this is simplist

Re: 'cp' utility bug when .exe file exist.

2010-06-09 Thread Corinna Vinschen
On Jun 9 08:14, Eric Blake wrote: > On 06/09/2010 08:08 AM, Andy Koppe wrote: > >>> More importantly, a lot of build scripts likely depend on the .exe being > >>> added automatically. > >> > >> Hm. Maybe they shouldn't. > > > > Yeah, but "shouldn't" never stopped anyone, hence any transition wou

Re: 'cp' utility bug when .exe file exist.

2010-06-09 Thread Eric Blake
On 06/09/2010 08:08 AM, Andy Koppe wrote: >>> More importantly, a lot of build scripts likely depend on the .exe being >>> added automatically. >> >> Hm. Maybe they shouldn't. > > Yeah, but "shouldn't" never stopped anyone, hence any transition would > certainly not be pain-free. A first step wo

Re: 'cp' utility bug when .exe file exist.

2010-06-09 Thread Andy Koppe
On 9 June 2010 14:50, Julio Costa wrote: [Running in cmd.exe] >>> The point is, that *is not* a reason, because it is easily fixed by >>> "set PATHEXE=%PATHEXE%:.". >> >> That's a nice one. I certainly didn't know about that. >> >> Explorer still needs the .exe though. > > Nope also. > Try thi

Re: 'cp' utility bug when .exe file exist.

2010-06-09 Thread Julio Costa
On Wed, Jun 9, 2010 at 14:20, Eric Blake wrote: > > Have you ever encountered a makefile that doesn't consistently use > $(EXEEXT) everywhere?  Too many people just expect 'gcc -o foo ...' to > produce foo, then 'strip foo' to work, without realizing that on cygwin, > gcc created 'foo.exe' and stri

Re: 'cp' utility bug when .exe file exist.

2010-06-09 Thread Julio Costa
On Wed, Jun 9, 2010 at 12:39, Andy Koppe wrote: > On 9 June 2010 10:48, Julio Costa wrote: And this is where my head got reeeally spinning... can anyone, please, explain the reason to why this .exe magic exists, anyway? > > As far as I understand it, the original reason for it was that Wind

Re: 'cp' utility bug when .exe file exist.

2010-06-09 Thread Eric Blake
On 06/09/2010 07:14 AM, Alexander T wrote: [please don't top-post] > Why not just do the exe magic for executing the files only? When > opening, stating, copying, moving etc, you could leave it out. This > seems the most reasonable compromise to me, but there could of course > be cases which I am

Re: 'cp' utility bug when .exe file exist.

2010-06-09 Thread Alexander T
Why not just do the exe magic for executing the files only? When opening, stating, copying, moving etc, you could leave it out. This seems the most reasonable compromise to me, but there could of course be cases which I am overseeing, but I wouldn't expect any script to rely on exe magic when openi

Re: 'cp' utility bug when .exe file exist.

2010-06-09 Thread Andy Koppe
On 9 June 2010 10:48, Julio Costa wrote: >>>And this is where my head got reeeally spinning... can anyone, please, >>>explain the reason to why this .exe magic exists, anyway? As far as I understand it, the original reason for it was that Windows 9x always required it. Of course Cygwin 1.7 no long

Re: 'cp' utility bug when .exe file exist.

2010-06-09 Thread Julio Costa
On Wed, Jun 9, 2010 at 05:40, Christopher Faylor wrote: > On Wed, Jun 09, 2010 at 02:38:30AM +0100, Julio Costa wrote: >>And this is where my head got reeeally spinning... can anyone, please, >>explain the reason to why this .exe magic exists, anyway? > > It's already been explained in this very th

Re: 'cp' utility bug when .exe file exist.

2010-06-08 Thread Christopher Faylor
On Wed, Jun 09, 2010 at 02:38:30AM +0100, Julio Costa wrote: >And this is where my head got reeeally spinning... can anyone, please, >explain the reason to why this .exe magic exists, anyway? It's already been explained in this very thread. cgf -- Problem reports: http://cygwin.com/problem

Re: 'cp' utility bug when .exe file exist.

2010-06-08 Thread David Antliff
On Wed, Jun 9, 2010 at 13:38, Julio Costa wrote: > And this is where my head got reeeally spinning... can anyone, please, > explain the reason to why this .exe magic exists, anyway? I can't answer that, but there is a style of symlinks that use .lnk files. Cygwin displays them without that extensi

Re: 'cp' utility bug when .exe file exist.

2010-06-08 Thread Julio Costa
Ok, I would like to jump in this subject, because this is getting me too waay curious... On Wed, Jun 9, 2010 at 01:17, Matthew B. Smith wrote: > Ill throw in my two cents.  I don't want to overwrite an existing file > accidentally.  Ie if I ls > foo and that writes to foo.exe I would be > frustrat

Re: 'cp' utility bug when .exe file exist.

2010-06-08 Thread Matthew B. Smith
Ill throw in my two cents. I don't want to overwrite an existing file accidentally. Ie if I ls > foo and that writes to foo.exe I would be frustrated. This hasn't happened to me yet so it might not be to big of a problem. It seems a bit odd that the behavior would change if there is a file in t

Re: 'cp' utility bug when .exe file exist.

2010-06-08 Thread RISINGP1
>> I disagree. This seems to me to be adopting the Microsoft policy of doing >> the user's thinking for them: "I don't care what they want - we know >> what's best for them." If a person wants to have "foo" and "foo.exe" in >> the same directory, that should be allowed. A few times getting t

Re: 'cp' utility bug when .exe file exist.

2010-06-08 Thread Corinna Vinschen
On Jun 8 12:09, risin...@nationwide.com wrote: > >On 06/08/2010 09:42 AM, risin...@nationwide.com wrote: > >> As to the "cp" issue, while IMHO, it should go ahead and do the copy, > >> a more instructive error message would be helpful: > >> > >> cp: cannot create regular file `my': File 'my.exe'

Re: 'cp' utility bug when .exe file exist.

2010-06-08 Thread Andrey Repin
Greetings, Eric Blake! >> As to the "cp" issue, while IMHO, it should go ahead and do the copy, >> a more instructive error message would be helpful: >> >> cp: cannot create regular file `my': File 'my.exe' exists > Huh? Do the copy, then give a failure message? No. A failure message > should

Re: 'cp' utility bug when .exe file exist.

2010-06-08 Thread RISINGP1
>On 06/08/2010 09:42 AM, risin...@nationwide.com wrote: >> As to the "cp" issue, while IMHO, it should go ahead and do the copy, >> a more instructive error message would be helpful: >> >> cp: cannot create regular file `my': File 'my.exe' exists > >Huh? Do the copy, then give a failure message?

Re: 'cp' utility bug when .exe file exist.

2010-06-08 Thread DePriest, Jason R.
On Tue, Jun 8, 2010 at 10:42 AM, wrote: > I disagree.  This seems to me to be adopting the Microsoft policy of doing > the user's thinking for them:  "I don't care what they want - we know > what's best for them."  If a person wants to have "foo" and "foo.exe" in > the same directory, that should

Re: 'cp' utility bug when .exe file exist.

2010-06-08 Thread Eric Blake
On 06/08/2010 09:42 AM, risin...@nationwide.com wrote: > As to the "cp" issue, while IMHO, it should go ahead and do the copy, > a more instructive error message would be helpful: > > cp: cannot create regular file `my': File 'my.exe' exists Huh? Do the copy, then give a failure message? No. A

Re: 'cp' utility bug when .exe file exist.

2010-06-08 Thread RISINGP1
On 06/08/2010 10:52 AM, Eric Blake wrote: >On 06/08/2010 08:43 AM, Steven Collins wrote: >> directory as can be demonstrated by a simple "touch foo foo.exe" >> command. Both files will be created. > >Arguably, both should NOT be created, for the same reasons. That is, it >is probably worth a patch

Re: 'cp' utility bug when .exe file exist.

2010-06-08 Thread Eric Blake
On 06/08/2010 08:43 AM, Steven Collins wrote: > directory as can be demonstrated by a simple "touch foo foo.exe" > command. Both files will be created. Arguably, both should NOT be created, for the same reasons. That is, it is probably worth a patch to make open("foo.exe",O_CREAT|O_EXCL,mode) fai

Re: 'cp' utility bug when .exe file exist.

2010-06-08 Thread Steven Collins
On Tue, Jun 8, 2010 at 08:01, Eric Blake <> wrote: > > On 06/08/2010 07:47 AM, Oleksandr Gavenko wrote: > >   $ touch my.exe > >   $ touch some-file > >   $ cp some-file my > > cp: cannot create regular file `my': File exists > >   $ cp -f some-file my > > cp: cannot create regular file `my': File

Re: 'cp' utility bug when .exe file exist.

2010-06-08 Thread Eric Blake
On 06/08/2010 07:47 AM, Oleksandr Gavenko wrote: > $ touch my.exe > $ touch some-file > $ cp some-file my > cp: cannot create regular file `my': File exists > $ cp -f some-file my > cp: cannot create regular file `my': File exists > > Same happen ever in cmd.exe so this is not 'bash' fault

'cp' utility bug when .exe file exist.

2010-06-08 Thread Oleksandr Gavenko
$ touch my.exe $ touch some-file $ cp some-file my cp: cannot create regular file `my': File exists $ cp -f some-file my cp: cannot create regular file `my': File exists Same happen ever in cmd.exe so this is not 'bash' fault. -- Problem reports: http://cygwin.com/problems.html FA