This is the mail archive of the cygwin@cygwin.com 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 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@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.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/


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