delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/10/01/09:19:09

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Wed, 1 Oct 2003 09:18:37 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Ronald Landheer-Cieslak <blytkerchan AT users DOT sourceforge DOT net>
cc: cygwin AT cygwin DOT com
Subject: Re: Postinstall hangs with bash
In-Reply-To: <20031001094149.GI7711@linux_rln.harvest>
Message-ID: <Pine.GSO.4.56.0310010856180.26607@slinky.cs.nyu.edu>
References: <000001c387b8$fb5faef0$8006fea9 AT bertigep> <20031001094149 DOT GI7711 AT linux_rln DOT harvest>
Importance: Normal
MIME-Version: 1.0

On Wed, 1 Oct 2003, Ronald Landheer-Cieslak wrote:

> On Wed, Oct 01, 2003 at 03:11:40AM +0200, Bertalan Fodor wrote:
> > I've overwritten sh.exe with bash.exe
> Don't do that.

Umm, aside from being unusual and drastic, why not?  bash should be fully
sh-compatible -- hey, it's used on Linux instead of sh...

> > With this setting cygpath hangs in myPostinstall.sh:
> >
> > ROOT=$(cygpath -w /)
> >
> > It is interesting.
> >
> > Using sh it is ok.
> $ ROOT=$(cygpath -w /)
> $ echo $ROOT
> D:\cygwin
>
> WFM
> rlc

Ronald,

Did you try it in a postinstall script?

$ cd /etc/postinstall
$ (echo '#!/bin/bash -x'; echo 'echo "$(cygpath -w /)"') > myPostinstall.sh

Then run setup, select "Keep", and then "Next".  This will not change your
existing installation, but will run the script.

FWIW, I can't reproduce it either.  I'm getting "c:\cygwin" in
/var/log/setup.log.full (plus the trace, of course).

Bert, do you have Cygwin installed in an unusual location?  Does the above
script reproduce the hang (without bash overwriting sh)?  If so, can you
please repeat the steps I outlined above and post the last 10 lines of
/var/log/setup.log.full (if setup hangs, press the cancel button)?

Also,

$ cd /etc/postinstall
$ (echo '#!/bin/sh -x'; echo 'bash -c "echo $(cygpath -w /)"') > myPostinstall2.sh

Can you also reproduce the problem with myPostinstall2.sh above?  Again,
can you please post the last 10 lines of /var/log/setup.log.full (be aware
that the file is overwritten *every time*)?

Finally, if the last step above reproduces your problem, try

$ cd /etc/postinstall
$ (echo '#!/bin/sh -x'; echo 'strace -o postinstall.strace bash -c "echo $(cygpath -w /)"') > myPostinstall3.sh

and see if you can reproduce the hang with myPostinstall3.sh...  You
should be able to look at /etc/postinstall/postinstall.strace to see where
bash (or cygpath) hangs.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019