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? :-)

 After python 2.7 there is 3.x AFAIK.

As I said, I'm aware of that.


--
WBR,
 Andrey Repin (anrdae...@freemail.ru) 16.09.2010, 15:07

Sorry for my terrible english...


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



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 a bug in the script.

Al

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



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 Cygwin, but we can't
 really say that there is a bug in the script.

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.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



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 really consider to improve it to make Cygwin still more Unix
compatible.

Al

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



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 just a description of the state.

 I guess there are some other reasons to do it this way. If not one
 should really consider to improve it to make Cygwin still more Unix
 compatible.

I'd love to drop the .exe suffix from readdir(), I'm just not sure what
unwelcome side-effects we create.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



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 argument in development.
 
 It wasn't an argument, it was just a description of the state.
 
  I guess there are some other reasons to do it this way. If not one
  should really consider to improve it to make Cygwin still more Unix
  compatible.
 
 I'd love to drop the .exe suffix from readdir(), I'm just not sure what
 unwelcome side-effects we create.

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.

In the first case, you get something like this:

  $ echo foo  bar.exe
  $ ls bar*
  bar
  $

Fortunately:

  $ ls bar.exe
  bar.exe

However, dependent of the intelligence of a script or application, the
suddenly missing suffix could result in trouble.

In the second case, the extra test for executability would be a big
performance hit, especially if you call `ls /usr/bin'.  And you know how
we already have a lot of users kicking our asses for Cygwin's
performance.

So, whatever we do will result in problems for another group of users.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



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 those side-effects
before everything goes public.

The listing with .exe extensions also has an informative value for the
human reader of the list, that would be lost.

Al

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



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 ideal approach, without thinking of backward issues?

How about this?

1.) When a file is made executable .exe is appended, but only visible
from Windows API.
2.) When the last execution bit is removed the .exe suffix is also removed.
3.) Using the .exe suffix from the Cygwin API always gives an error.
4.) Hence: You never see this suffix on the Cygwin API.

Al

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



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

What would be the ideal approach, without thinking of backward issues?

How about this?

1.) When a file is made executable .exe is appended, but only visible
from Windows API.
2.) When the last execution bit is removed the .exe suffix is also removed.
3.) Using the .exe suffix from the Cygwin API always gives an error.
4.) Hence: You never see this suffix on the Cygwin API.


How would this work with non-Cygwin programs?  They wouldn't be handled under
(1).

--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
216 Dalton Rd.  (508) 893-9889 - FAX
Holliston, MA 01746

_

A: Yes.

Q: Are you sure?

A: Because it reverses the logical flow of conversation.

Q: Why is top posting annoying in email?


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



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 be looking for python2.* instead.
Minor version could have any length... potentially. (And yes, I know, there
wouldn't be .10 for now)

 Here the script needs a modification to work with Cygwin, but we can't
 really say that there is a bug in the script.


--
WBR,
 Andrey Repin (anrdae...@freemail.ru) 15.09.2010, 21:18

Sorry for my terrible english...


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



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
handling. The normal windows one, always with .exe suffix stored
into the filename of executables. When mounting foreign unix
filesystems no .exe magic would be used at all on them.

Al

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



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 want's to find python2.x and nothing else.

The script is a normal POSIX script and has no knowlege of Cygwins
existance at all and any of it's special behaviour.

Al

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



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.

 What would be the ideal approach, without thinking of backward issues?

 How about this?

 1.) When a file is made executable .exe is appended, but only visible
 from Windows API.
 2.) When the last execution bit is removed the .exe suffix is also removed.
 3.) Using the .exe suffix from the Cygwin API always gives an error.
 4.) Hence: You never see this suffix on the Cygwin API.

May I point to the fact that not only binary files could be executable?
Shell(both), Perl, PHP scripts...

(Wish we could set short file name longer than 8.3 ... that would be
wonderful and semi-transparent solution...)


--
WBR,
 Andrey Repin (anrdae...@freemail.ru) 15.09.2010, 21:21

Sorry for my terrible english...


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



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 which is not
 wanted. It want's to find python2.x and nothing else.

 The script is a normal POSIX script and has no knowlege of Cygwins
 existance at all and any of it's special behaviour.

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.


--
WBR,
 Andrey Repin (anrdae...@freemail.ru) 15.09.2010, 21:37

Sorry for my terrible english...


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



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

Al

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple