This is the mail archive of the cygwin-apps@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: [PATCH] Setup postinstall logging - take 3?


On Fri, 21 Mar 2003, Brian Keener wrote:

> Igor Pechtchanski wrote:
> > script.cc, change the "#if 0" in line 185 to "#if 1", and test that, I'd
> > appreciate it.  The expected result is that no window is shown at all -
> > setup should just seem to hang for a bit while it's running postinstall
> > scripts.  You should be able to track its progress by getting a listing of
> > the /etc/postinstall directory and seeing scripts renamed to ".done".
> >
> > You might also wish to apply the latest patch I sent
> > (<http://cygwin.com/ml/cygwin-apps/2003-03/msg00618.html>) which adds
> > progress bars and runs postinstall scripts in a different thread.
> >
> I tried updating from HEAD and compiled on W2k and Win95.  I then ran and
> reinstalled  gcc-mingw and inetutils.  I still got a command window which I
> believe was before the install (and was actually doing the uninstall - but I
> think it said postinstall) and then it did the install and then no other
> windows (just "create icons" in the task bar and as a title on the current
> window then installation complete.
>
> I then tried the above patch for the progress bars and the different thread and
> reinstalled same two packages - I saw the .sh files change to .sh.done but saw
> no difference in the screens from the first time I ran.  No progress bars or
> difference in windows.  On either machine. :-(
>
> Just thought I would give you an update but I need to play with this one more
> and look at some code and see if I can tell if it is working and where it
> should be working.
> bk

Brian,

The flashing windows are probably the pre-remove scripts - my patch didn't
touch them.  I'll send a separate patch for that.

Looks like you got the expected result with HEAD.  There should be no
windows popping up.  The script output was logged, though, wasn't it?

The separate postinstall thread moves postinstall script execution to
right after the install phase (i.e., before the "Create Icons" dialog), so
you could have seen it but thought it was still the install phase.  It's
easy to check whether you get the right progress bars by creating the
following file in your /etc/postinstall:

#!/bin/sh
echo Testing postinstall script 1 >&2
sleep 5
echo Done >&2

(you could call it "testpostinstall.sh"), and then look at the window
during the 5 second pause.  It should say "Running..."
"testpostinstall.sh".

I don't think progress bars will show any useful information with only one
script.  If you create a few of those (testpostinstall1.sh,
testpostinstall2.sh, etc), you should see the progress bar jumping in
5-second increments.

Thanks again for testing,
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha at cs dot nyu dot edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor at watson dot ibm dot com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk!
  -- /usr/games/fortune


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