From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19855 invoked by alias); 6 Feb 2009 12:24:31 -0000 Received: (qmail 19846 invoked by uid 22791); 6 Feb 2009 12:24:30 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from hagrid.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.197) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 06 Feb 2009 12:24:26 +0000 Received: from localhost (hagrid.ecoscentric.com [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id 4EB1360B801B; Fri, 6 Feb 2009 12:24:24 +0000 (GMT) Received: from mail.ecoscentric.com ([127.0.0.1]) by localhost (hagrid.ecoscentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SIJmazhrJAPe; Fri, 6 Feb 2009 12:24:22 +0000 (GMT) Date: Fri, 06 Feb 2009 12:24:00 -0000 Message-Id: From: Bart Veer To: John Dallaway CC: ecos-maintainers@ecos.sourceware.org In-reply-to: <496635B7.8060808@dallaway.org.uk> (message from John Dallaway on Thu, 08 Jan 2009 17:19:51 +0000) Subject: Re: #!/usr/bin/env tclsh References: <496635B7.8060808@dallaway.org.uk> Mailing-List: contact ecos-maintainers-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-maintainers-owner@ecos.sourceware.org X-SW-Source: 2009-02/txt/msg00008.txt.bz2 >>>>> "John" == John Dallaway writes: John> This patch simplifies the #! magic used to invoke Tcl John> scripts by using "/usr/bin/env tclsh" to find the tclsh John> executable. Very old Cygwin installations providing only John> tclsh83.exe or cygtclsh80.exe are no-longer supported. John> Checked-in. Actually, this patch has broken things in various ways. Consider e.g. file2c.tcl in the romfs package. The CDL invokes this using e.g.: sh file2c.tcl testromfs_le.bin testromfs_le.h With the old magic this still worked fine because sh would ignore the #! at the start completely and move on to the 'exec sh -c' on line 3. With the new '#!/usr/bin/env tclsh' the sh invocation ignores the #! comment on line 1 so ends up trying to run the whole Tcl script as a shell script. Needless to say this is not very successful. io/framebuf is similarly affected. services/memalloc/common is not. I have not yet checked all the other packages that use Tcl scripts. Possible solutions are: 1) revert the change 2) remove the 'sh' bits from the relevant CDL scripts, treating the Tcl script as plain executables. 3) make the CDL invoke /usr/bin/env tclsh directly, treating the Tcl scripts as Tcl scripts. (1) would be a bad move. I think I would prefer (3) to (2). Bart -- Bart Veer eCos Configuration Architect eCosCentric Limited The eCos experts http://www.ecoscentric.com/ Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571 Registered in England and Wales: Reg No 4422071. Besuchen Sie uns vom 3.-5.03.09 auf der Embedded World 2009, Stand 11-300 Visit us at Embedded World 2009, Nürnberg, Germany, 3-5 Mar, Stand 11-300