This is the mail archive of the cygwin-apps@cygwin.com 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] Postinstall script ordering in setup


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 at cs dot nyu dot 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>.

Attachment: signature.asc
Description: This is a digitally signed message part


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