This is the mail archive of the cygwin-apps 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] Propagate exit codes of scripts to setup


> 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



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