package driven postinstall scripts.

Robert Collins rbcollins@cygwin.com
Sun Mar 16 04:44:00 GMT 2003


Igor,
	what do you think of the attached patch.

It's a halfway house between your embedded ordering and the package 
ordering I'm proposing.

This patch changes setups behaviour on only one way:
package included post-install scripts will run before hand placed 
scripts. (i.e. Pierre's security testing script).

It doesn't (yet) add dependencies to the the script ordering, but that 
is truely trivial given an ordered iterator for the package db.

Will I be causing grief for you by applying this patch?

The install.cc changes I plan to apply regardless, modulo the 'Note 
script files as they are installed' 2-liner.

If this goes in, then I can easily throw a package-ordered iterator at 
postinstall and solve the root problem.

BTW: What was the test case that prompted a need for ordered postinstall 
scripts?

Rob

2003-03-15  Robert Collins  <rbtcollins@hotmail.com>

         * install.cc: Introduce Installer class.
         (init_dialog): Rename to Installer::initDialog.
         (progress): Rename to Installer::progress.
         (standard_dirs): Rename to Installer::StandardDirs.
         (uninstall_one): Rename to Installer::uninstallOne.
         (replace_one): Rename to Installer::replaceOne.
         (log_ror_failure): Rename to Installer::replaceOnRebootFailed.
         (log_ror_success): Rename to Installer::replaceOnRebootSucceeded.
         (install_one_source): Rename to Installer::installOneSource.
         Note script files as they are installed.
         * package_version.cc (packageversion::addScript): Implement.
         (packageversion::scripts): Implement.
         * package_version.h (packageversion::addScript): Record the 
presence of a script.
         * script.h (Script): New class to track scripts.
         * postinstall.cc (do_postinstall): Iterate through the package 
listed scripts before searching for scripts.
         * String++.cc (String::substr): Second argument needed to be 
signed.
         * String++.h (String::substr): Second argument needed to be signed.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: postinstallChange.patch
URL: <http://cygwin.com/pipermail/cygwin-apps/attachments/20030316/42a4109b/attachment.ksh>


More information about the Cygwin-apps mailing list