This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Postinstall hangs with bash

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
> >
> > ROOT=$(cygpath -w /)
> >
> > It is interesting.
> >
> > Using sh it is ok.
> $ ROOT=$(cygpath -w /)
> $ echo $ROOT
> D:\cygwin
> rlc


Did you try it in a postinstall script?

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

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


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

Can you also reproduce the problem with 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 /)"') >

and see if you can reproduce the hang with  You
should be able to look at /etc/postinstall/postinstall.strace to see where
bash (or cygpath) hangs.
      |\      _,,,---,,_
ZZZzz /,`.-'`'    -.  ;-;;,_
     |,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:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]