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: Errors during setup post-install scripts


On Wed, 16 Oct 2002, Igor Pechtchanski wrote:

> On Wed, 16 Oct 2002, David A. Cobb wrote:
>
> > Igor Pechtchanski wrote:
> >
> > >On 16 Oct 2002, Robert Collins wrote:
> > >
> > >>On Wed, 2002-10-16 at 09:11, Max Bowsher wrote:
> > >>
> > >>>David A. Cobb wrote:
> > >>>
> > >>>>Would it be a big deal to have the various setup scripts send their
> > >>>>output to, say, /var/log/setup/SCRIPTNAME.log?
> > >>>>
> > >>>Probably not, but someone has to actually do it.
> > >>>
> > >>It's been discussed in the cygwin-apps list, at length.
> > >
> > >I'm looking into a simple-minded way to do this, and this raised at least
> > >one question: do we actually need the output of the post-install scripts
> > >flashing in front of our eyes?
> > >
> > IMO, no - the screen displays generally flash past too fast to be read
> > anyway.  Just log it!
> >
> > >If not, I can just redirect it to a file,
> > >say, /var/log/setup.log.postinstall (there's probably no need for a
> > >separate file per script).
> > >
> > Well, it needs to be fairly simple to tell which script failed - if any.
> >
> > >If we actually want the console windows, it'll take some more doing,
> > >probably a separate console tee-like application.
> > >     Igor
>
> I was planning to bracket the script output with 'Running <scriptname>'
> and 'Done <scriptname>'.  This should be enough...
>         Igor

Ok, attached is the patch to setup that redirects the output of
postinstall scripts to a file (/var/log/setup.log.postinstall), bracketing
it with timestamped "Running <scriptname>" and "Done <scriptname>".
It's currently not tied into the logging mechanism, and it only redirects
the postinstall scripts (as compared to preremove and postremove), but
both are reasonably easy to add building on this patch.
	Igor

ChangeLog:
2002-10-16  Igor Pechtchanski <pechtcha@cs.nyu.edu>

	* script.cc (run): Add lname parameter.
	Redirect output of subprocess to file.
	(run_script): Add optional lname parameter.
	* script.h (run_script): Ditto.
	* postinstall.cc (RunFindVisitor::visitFile): Pass
	filename to run_script().

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

"Water molecules expand as they grow warmer" (C) Popular Science, Oct'02, p.51

Attachment: setup-postinstall-log.patch
Description: Text document

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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]