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: [PATCH] Logging output of post-install scripts in setup - Take2

Attached is a 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.

The patch was tested on Win2k SP2 and Win98 (the two systems I have access
to).  In particular, I did a clean install on the Win98 machine, and the
output from all .sh and .bat postinstall scripts went into a (newly
created) /var/log/setup.log.postinstall.

2002-10-17  Igor Pechtchanski <>

	* (run): Add lname parameter.
	Redirect output of subprocess to file, creating the
	path if necessary.
	(run_script): Add optional lname parameter.
	(get_now_string): New function.
	(prepareOutputLog): New function.
	(closeOutputLog): New function.
	(log_failure_notified): New static variable.
	* script.h (run_script): Add optional lname parameter.
	* (RunFindVisitor::visitFile): Pass
	filename to run_script().

      |\      _,,,---,,_
ZZZzz /,`.-'`'    -.  ;-;;,_
     |,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

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