[PATCH] Propagate exit codes of scripts to setup

Eric Blake ericblake@comcast.net
Fri Aug 19 19:17:00 GMT 2005


> As promised, here's a patch that makes Script::run() (and
> try_run_script()) return the exit code of the script.  This just sets up
> the infrastructure -- the exit code is currently ignored (well, logged),
> but that could be changed later in both Installer::preremoveOne(),
> packagemeta::uninstall(), and do_postinstall_thread().
> As usual, the ChangeLog is below.

Looks like a good start to me.

> 	Igor
> > Index: package_meta.cc
> ===================================================================
> RCS file: /cvs/cygwin-apps/setup/package_meta.cc,v
> retrieving revision 2.48
> diff -u -p -r2.48 package_meta.cc
> --- package_meta.cc	14 May 2005 15:30:06 -0000	2.48
> +++ package_meta.cc	19 Aug 2005 18:14:43 -0000
> @@ -201,7 +201,8 @@ packagemeta::uninstall ()
>          if (RemoveDirectory (d.c_str()))
>            log (LOG_BABBLE) << "rmdir " << d << endLog;
>        }
> -      try_run_script ("/etc/postremove/", name);
> +      try_run_script ("/etc/postremove/", name, ".sh");
> +      try_run_script ("/etc/postremove/", name, ".bat");

Since there are no more postremove scripts in the distribution, and
since postremove is arguably broken (because the script's dependencies
may have been uninstalled pending an upgrade), should we instead just
delete postremove attempts from setup.exe altogether?

--
Eric Blake




More information about the Cygwin-apps mailing list