X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-1.3 required=5.0	tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SARE_FREE_WEBM_LAPOSTE,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
Message-ID: <4C294340.1010907@laposte.net>
Date: Tue, 29 Jun 2010 02:50:08 +0200
From: Cyrille Lefevre <cyrille.lefevre-lists@laposte.net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.3) Gecko/20070326 Thunderbird/2.0.0.0 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: Regression in .exe extension handling
References: <1277766496.7412.18.camel@YAAKOV04> <4C292D35.6000005@redhat.com>
In-Reply-To: <4C292D35.6000005@redhat.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable
X-me-spamlevel: not-spam
X-me-spamrating: 34.799999
X-me-spamcause:  OK, (-130)(0000)gggruggvucftvghtrhhoucdtuddrvdelhedrtdehucetggdotefuucfrrhhofhhilhgvmecuoehnohhnvgeqnecuuegrihhlohhuthemuceftddtnecuucdlqddutddtmdenthhhvgcuphhrohgslhgvmhculddqfedtmd
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com


Le 29/06/2010 01:16, Eric Blake a =C3=A9crit :
> On 06/28/2010 05:08 PM, Yaakov (Cygwin/X) wrote:
>> It is not unusual for mono packages to create a wrapper script (to be
>> installed in PATH) in the same directory as an assembly (which has .exe
>> suffix and is installed out of PATH), which uncovered a regression using
>> the 20100622 snapshot:
>>
>> echo script>  foo
>> echo executable>  foo.exe
>> mkdir bar
>> install foo bar/foo
>
> The problem is here - should install be open()ing "foo" (the script) or
> "foo.exe" (the executable) as the source file for copying into bar/foo?

well, how about the use of the O_BINARY flag to make the decision ?
if both files exists and O_BINARY is specified, open the .exe one,
the other one otherwise ?

> Since it is never a good idea to have both an .exe and a script of the
> same name in the same directory, is this really a regression, or just

why? many scripts use this assertion, they usually are called=20
wrappers... :-)

> bad behavior on mono's part?  Remember, libtool was recently changed to
> avoid exactly this ambiguity.  Or should I be trying to patch coreutils
> (and/or someone patch cygwin1.dll) to try harder to open the script
> instead of the .exe when the suffix-less file conflicts with the .exe?

easy for reading (':' or '#!', rem, etc. :-), does "file" is implemented=20
as part of the cygwin1.dll. not so easy for writing...

Regards,

Cyrille Lefevre
--=20
mailto:Cyrille.Lefevre-lists@laposte.net



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

