public inbox for ecos-maintainers@sourceware.org
 help / color / mirror / Atom feed
  • * Re: #!/usr/bin/env tclsh
           [not found] <496635B7.8060808@dallaway.org.uk>
           [not found] ` <49663810.3010202@eCosCentric.com>
    @ 2009-02-06 12:24 ` Bart Veer
      2009-02-06 12:38   ` Gary Thomas
      2009-02-06 13:49   ` John Dallaway
      1 sibling, 2 replies; 7+ messages in thread
    From: Bart Veer @ 2009-02-06 12:24 UTC (permalink / raw)
      To: John Dallaway; +Cc: ecos-maintainers
    
    [-- Warning: decoded text below may be mangled, UTF-8 assumed --]
    [-- Attachment #1: Type: text/plain, Size: 1746 bytes --]
    
    >>>>> "John" == John Dallaway <john@dallaway.org.uk> 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
    
    ^ permalink raw reply	[flat|nested] 7+ messages in thread

  • end of thread, other threads:[~2009-02-06 14:03 UTC | newest]
    
    Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
    -- links below jump to the message on this page --
         [not found] <496635B7.8060808@dallaway.org.uk>
         [not found] ` <49663810.3010202@eCosCentric.com>
    2009-01-08 17:51   ` #!/usr/bin/env tclsh John Dallaway
    2009-01-08 18:21     ` Jonathan Larmour
    2009-02-06 12:24 ` Bart Veer
    2009-02-06 12:38   ` Gary Thomas
    2009-02-06 12:53     ` Bart Veer
    2009-02-06 13:49   ` John Dallaway
    2009-02-06 14:03     ` Gary Thomas
    

    This is a public inbox, see mirroring instructions
    for how to clone and mirror all data and code used for this inbox;
    as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).