cp, install, and the .exe extension

Larry Hall cygwin-lh@cygwin.com
Fri Feb 20 19:51:00 GMT 2004


At 01:33 PM 2/20/2004, Robert R Schneck you wrote:
>Christopher Faylor <cgf-no-personal-reply-please@cygwin.com> wrote:
>> On Thu, Feb 19, 2004 at 10:09:55PM +0000, Robert R Schneck wrote:
>>>If I replace "copy.c" with either of the other two and rebuild, I get a 
>>>"cp" which *does* have special handling for the .exe extension.
>>>Did the fileutils maintainer just forget to do this?
>>
>> No.
>
>Indeed.  Does this mean there is some reason that it is considered 
>harmful to have cp do it, but appropriate to have install do it?


Yes.


>If so, can you explain?  


No.


>I don't question, I'm just curious!


Yeah, sure...

OK, I'm just kiddin' you. ;-)  Think about a 'cp' that transparently handles 
'.exe' and a directory with 'foo' and 'foo.exe'.  You need to be able to 
copy both.  'install' is a special purpose utility.  Many projects that
use it to install don't consider that executables may require extensions on 
other platforms.  So they're written to just install 'foo'.  That causes
install failures.  It makes sense to "relax" the rules here, since it 
helps more than it hurts.  The reverse is true for 'cp' and other general 
purpose utilities.


>In any case, I'd like to put in a request to change the error message cp 
>gives when "cp foo bar" is tried and only foo.exe exists.  
>Currently it says
>cp: `foo' and `bar' are the same file
>which is needlessly obscure.


How about a patch instead of a request? ;-)


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


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



More information about the Cygwin mailing list