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]

[PATCH] setup: Detect postinstall scripts correctly


-= WARNING =-  -= WARNING =-  -= WARNING =-  -= WARNING =-  -= WARNING =-
Do NOT apply this patch until all the consequences have been considered
and discussed.
-= WARNING =-  -= WARNING =-  -= WARNING =-  -= WARNING =-  -= WARNING =-

This is a trivial patch that fixes a bug in postinstall script detection.
You may have noticed that when all postinstall scripts are run, "No
package" is displayed in the progress window.  Here's some history:

When I first implemented the logging of postinstall script output, I
figured we'd run the known postinstall scripts (those coming from the
packages we just installed) first, in dependency order, and then run all
other postinstall scripts (e.g., custom ones, or those created by
postinstall scripts themselves) in alphanumeric order.  There is code in
setup to display the name of the package for which we are currently
running postinstall scripts, with "No package" displayed for those "other"
scripts.

Unfortunately, there was a small bug in string comparison (which the
attached patch fixes) that failed to detect *any* postinstall scripts in
packages, causing everything in /etc/postinstall to be treated as "other".

As I understand, there are now some postinstall scripts that rely on the
current (buggy) behavior.  However, this is the only way to enforce a
deterministic order on the postinstall script execution in the presence of
circular dependencies.  Before we apply this patch, we ought to make sure
that the current postinstall script structure doesn't break.  It didn't
seem to break for me -- I've tested it on a relatively large fresh
install, but, as we all know, "one sample does not a statistic make"(tm).
I'd be more comfortable with, say, Eric signing off on this with respect
to the ash/bash postinstall scripts.

Discussion welcome.  As usual, the ChangeLog is below.
	Igor
==============================================================================
2005-09-27  Igor Pechtchanski  <pechtcha@cs.nyu.edu>

	* script.cc (isAScript): Fix string comparison.

-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. /DA

Attachment: setup-postinstall-detection.patch
Description: Text document


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