This is the mail archive of the
mailing list for the Cygwin project.
RE: [PATCH] setup: fix abnormal exit test for postinstall scripts
- From: Igor Peshansky <pechtcha at cs dot nyu dot edu>
- To: Dave Korn <dave dot korn at artimi dot com>
- Cc: cygwin-apps at cygwin dot com
- Date: Thu, 9 Mar 2006 18:49:24 -0500 (EST)
- Subject: RE: [PATCH] setup: fix abnormal exit test for postinstall scripts
- References: <075701c643d1$4e248580$a501a8c0@CAM.ARTIMI.COM>
- Reply-to: cygwin-apps at cygwin dot com
On Thu, 9 Mar 2006, Dave Korn wrote:
> On 09 March 2006 23:14, Max Bowsher wrote:
> >>> * script.cc (Script::run): Fix inverted test for abnormal exit.
> >>> Do not rename to ".done" unless completed successfully.
> >> And ping (attached as "setup-script-exit-code-fix.patch").
> > Do we necessarily want to try to re-run failed scripts the next time
> > setup installs some packages?
Why not? It would make recovery from a hosed install because of in-use
DLLs easy enough -- just re-run setup and select "Keep", which will only
rerun the postinstall scripts.
> > Perhaps renaming to ".failed" would be better that not renaming.
> > Max.
> Perhaps setup should check when you first start it up whether there
> are any postinstall scripts left lying around from last time and offer
> to run them for you then and there? Failed postinstalls should be run
> to completion *before* next updating the package!
Why? I'm not so certain. So your preremove will fail -- who cares, it
would also fail if "cygwin" is upgraded and is uninstalled before the
preremove script is run. Next time you upgrade, it'll be like the initial
install all over again, and the *new* postinstall will run. If you didn't
touch the package, however, the postinstall that failed before will be
re-run. If it failed because of something in the environment when setup
was run (e.g., a stale DLL in memory), it will now succeed and will be
renamed to .done. If it fails again, we'll know something was wrong, and
will recommend looking at the output in setup.log.full.
|\ _,,,---,,_ firstname.lastname@example.org | email@example.com
ZZZzz /,`.-'`' -. ;-;;,_ Igor Peshansky, Ph.D. (name changed!)
|,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"