Re: .exe magic reloaded 2

2010-09-16 Thread Andrey Repin
Greetings, Al! >> You didn't read my reply to the end, but I accept your explanation. >> Still, that specific point of code is suspicious for my taste of >> fool-proof'ness. >> > Sure you could reflect about the length of minor versions here. But > does that address the original topic? :-) > Aft

Re: .exe magic reloaded 2

2010-09-15 Thread Al
> > You didn't read my reply to the end, but I accept your explanation. > Still, that specific point of code is suspicious for my taste of > fool-proof'ness. > Sure you could reflect about the length of minor versions here. But does that address the original topic? :-) After python 2.7 there is 3

Re: .exe magic reloaded 2

2010-09-15 Thread Andrey Repin
Greetings, Al! >> I'm fairly certain, that the script is bugged in this specific case. >> It should be looking for python2.* instead. >> Minor version could have any length... potentially. (And yes, I know, there >> wouldn't be .10 for now) > Definitly not. It would also find "python2.6-config" w

Re: .exe magic reloaded 2

2010-09-15 Thread Andrey Repin
Greetings, Al! >> For instance, this one:  Either we always remove the .exe suffix from >> a file, or we have to check for each file with a .exe suffix, whether >> it's executable or not. > Probably without checking it. No sane program would use the .exe > suffix as extension of a mere textfile.

Re: .exe magic reloaded 2

2010-09-15 Thread Al
> I'm fairly certain, that the script is bugged in this specific case. > It should be looking for python2.* instead. > Minor version could have any length... potentially. (And yes, I know, there > wouldn't be .10 for now) Definitly not. It would also find "python2.6-config" which is not wanted. It

Re: .exe magic reloaded 2

2010-09-15 Thread Al
>> 1.) When a file is made executable .exe is appended, but only visible >> from Windows API. > How would this work with non-Cygwin programs?  They wouldn't be handled > under > (1). Depends on how you install or mount them. But yes, as a prerequest there would be two types of filessystem handli

Re: .exe magic reloaded 2

2010-09-15 Thread Andrey Repin
Greetings, Al! > I have another interesting case where .exe magic doesn't work as > transparently as one would expect. > I have a file python2.6.exe. A script tries to find it with "ls > python2.?". It is not found. I'm fairly certain, that the script is bugged in this specific case. It should b

Re: .exe magic reloaded 2

2010-09-15 Thread Larry Hall (Cygwin)
On 9/15/2010 12:23 PM, Al wrote: For instance, this one: Either we always remove the .exe suffix from a file, or we have to check for each file with a .exe suffix, whether it's executable or not. Probably without checking it. No sane program would use the .exe suffix as extension of a mere te

Re: .exe magic reloaded 2

2010-09-15 Thread Al
> > For instance, this one:  Either we always remove the .exe suffix from > a file, or we have to check for each file with a .exe suffix, whether > it's executable or not. Probably without checking it. No sane program would use the .exe suffix as extension of a mere textfile. What would be the id

Re: .exe magic reloaded 2

2010-09-15 Thread Al
> I'd love to drop the .exe suffix from readdir(), I'm just not sure what > unwelcome side-effects we create. > Yes, that's always the point. All programs would break, that are only build against the .exe suffix. Like mine after patching it. :-) Don't know if Cygwin has a testing state to fix tho

Re: .exe magic reloaded 2

2010-09-15 Thread Corinna Vinschen
On Sep 15 15:50, Corinna Vinschen wrote: > On Sep 15 15:38, Al wrote: > > > > > > True.  In theory we would have to remove .exe and .lnk suffixes from > > > directory listings as well, but that was never the case in Cygwin. > > > > > > > > > > That's the way it has always been... isn't a strong ar

Re: .exe magic reloaded 2

2010-09-15 Thread Corinna Vinschen
On Sep 15 15:38, Al wrote: > > > > True.  In theory we would have to remove .exe and .lnk suffixes from > > directory listings as well, but that was never the case in Cygwin. > > > > > > That's the way it has always been... isn't a strong argument in development. It wasn't an argument, it was jus

Re: .exe magic reloaded 2

2010-09-15 Thread Al
> > True.  In theory we would have to remove .exe and .lnk suffixes from > directory listings as well, but that was never the case in Cygwin. > > That's the way it has always been... isn't a strong argument in development. I guess there are some other reasons to do it this way. If not one should

Re: .exe magic reloaded 2

2010-09-15 Thread Corinna Vinschen
On Sep 15 13:40, Al wrote: > Hello, > > I have another interesting case where .exe magic doesn't work as > transparently as one would expect. > > I have a file python2.6.exe. A script tries to find it with "ls > python2.?". It is not found. > > Here the script needs a modification to work with C

Re: .exe magic reloaded 2

2010-09-15 Thread Al
Hello, I have another interesting case where .exe magic doesn't work as transparently as one would expect. I have a file python2.6.exe. A script tries to find it with "ls python2.?". It is not found. Here the script needs a modification to work with Cygwin, but we can't really say that there is

Re: .exe magic reloaded

2010-09-06 Thread Al
> > I got a little bit confused now. Should I report now upstream at Perl > that Configure > has a problem by adding .exe, or is it just a problem with your layout? > > AFAIK perl does not symlink tr.exe, just its own files when using > -Dmksymlinks. > And failing to read a wrong tr.exe symlink do

Re: .exe magic reloaded

2010-09-06 Thread Al
> > I got a little bit confused now. Should I report now upstream at Perl > that Configure > has a problem by adding .exe, or is it just a problem with your layout? > > AFAIK perl does not symlink tr.exe, just its own files when using > -Dmksymlinks. > And failing to read a wrong tr.exe symlink do

Re: .exe magic reloaded

2010-09-06 Thread Reini Urban
2010/9/6 Al: >> The magic is to *add* the .exe suffix automatically, not *removing* it > > Aaaahh! > > That is one point I missed. The magic is still more limited than I > assumed. It felt to work bidirectional. > > I have tested this. The unidirectonal magic also works for symlinks, > if t

Re: .exe magic reloaded

2010-09-06 Thread Al
> The magic is to *add* the .exe suffix automatically, not *removing* it Aaaahh! That is one point I missed. The magic is still more limited than I assumed. It felt to work bidirectional. I have tested this. The unidirectonal magic also works for symlinks, if the symlink has the .exe suf

Re: .exe magic reloaded

2010-09-06 Thread Corinna Vinschen
On Sep 6 14:56, Al wrote: > > > > It's definitely a bug in perl's Configure.  If the name of the symlink > > is "foo", there's not the faintest reason to assume that "foo.exe" should > > work at all. > > > > > > Corinna > > > > Magic is when it does the right thing magically. With your approach >

Re: .exe magic reloaded

2010-09-06 Thread Al
> > It's definitely a bug in perl's Configure.  If the name of the symlink > is "foo", there's not the faintest reason to assume that "foo.exe" should > work at all. > > > Corinna > Magic is when it does the right thing magically. With your approach you don't need any magic at all. Al -- Problem

Re: .exe magic reloaded

2010-09-06 Thread Corinna Vinschen
On Sep 6 12:36, Al wrote: > >> That's what Perls "Configure" does. Still the magic works only in the > >> target directory, but not on the level of the symlink itself. > > > > Uh, I see.  That's a bug in perl's Configure.  It shouldn't use the > > .exe suffix at all. > > > > > > Right, Perl wants

Re: .exe magic reloaded

2010-09-06 Thread Al
>> That's what Perls "Configure" does. Still the magic works only in the >> target directory, but not on the level of the symlink itself. > > Uh, I see.  That's a bug in perl's Configure.  It shouldn't use the > .exe suffix at all. > > Right, Perl wants to be superschlau and adds the .exe suffix.

Re: .exe magic reloaded

2010-09-06 Thread Corinna Vinschen
On Sep 6 11:53, Al wrote: > It does not: > > > It does: > > > >  $ cd tmp > >  $ mkdir dir1 dir2 > >  $ cp /bin/echo.exe dir1 > >  $ ln -s `pwd`/dir1/echo.exe dir2/echo > >  $ ls -l dir* > >  dir1: > >  total 52 > >  -rwxr-xr-x 1 corinna vinschen 49166 2010-09-06 10:59 echo.exe > > > >  dir2: > >

Re: .exe magic reloaded

2010-09-06 Thread Al
It does not: > It does: > >  $ cd tmp >  $ mkdir dir1 dir2 >  $ cp /bin/echo.exe dir1 >  $ ln -s `pwd`/dir1/echo.exe dir2/echo >  $ ls -l dir* >  dir1: >  total 52 >  -rwxr-xr-x 1 corinna vinschen 49166 2010-09-06 10:59 echo.exe > >  dir2: >  total 1 >  lrwxrwxrwx 1 corinna vinschen 31 2010-09-06

Re: .exe magic reloaded

2010-09-06 Thread Corinna Vinschen
On Sep 5 16:28, Al wrote: > I came accross the following. These two files existed. > > /home/prefix/gentoo/bin/tr.exe > /home/prefix/gentoo/usr/bin/tr -> /home/prefix/gentoo.bin/tr.exe ^^^ dot,