[PATCH] Postinstall script ordering in setup

Robert Collins rbcollins@cygwin.com
Tue Mar 4 06:12:00 GMT 2003


On Tue, 2003-03-04 at 15:36, Igor Pechtchanski wrote:
> Hi,
> 
> This patch adds a dependence tracking mechanism to postinstall scripts.
> The idea is essentially the one described in
> <http://cygwin.com/ml/cygwin-apps/2003-03/msg00022.html>.  This patch is
> very preliminary, and not tested much beyond its ability to sort scripts
> correctly (compiles, though).  This should provide a foundation for
> further refinement, however.  Please comment.

Commenting from the changelog for now...

I'll do a more indepth review when the obvious issues below are sorted
out. BTW: I agree with this concept as a short term solution.


> 	Igor
> ==============================================================================
> ChangeLog:
> 2003-03-03  Igor Pechtchanski <pechtcha@cs.nyu.edu>
> 
> 	* postinstall.cc (RunFindVisitor::executeAll): New
> 	member function that propagates script dependences,
> 	topologically sorts the script list, and then executes
> 	the scripts.

This does too much. When a method does more than one thing... split it
up. 

> 	(RunFindVisitor::visitFile): Add file to list instead of
> 	running it.
> 	(RunFindVisitor::files): New member variable.
> 	(processFile): New static helper function that extracts
> 	dependences from each script file.

I suspect at this point we may want a class to handle this - to extract,
remember and sort dependencies.

> 	(do_postinstall): Add executeAll call.
> 	(FileDesc): New helper class.
> 	(sharpbang): New static helper function.

This should be in a class, IMO. 

Rob
-- 
GPG key available at: <http://users.bigpond.net.au/robertc/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://cygwin.com/pipermail/cygwin-apps/attachments/20030304/b5a33dd4/attachment.sig>


More information about the Cygwin-apps mailing list