This is the mail archive of the 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: Pending setup patches (issue 6)

On Sun, 9 Mar 2003, Max Bowsher wrote:

> Igor Pechtchanski wrote:
> > On Sun, 9 Mar 2003, Max Bowsher wrote:
> >> But what about:
> >> +    // TODO: free unused map entries
> >
> > Not a show-stopper.  Setup keeps all kinds of memory chunks around.
> > They'll be freed when it exits anyway, it's just cleaner to explicitly
> > manage them.
> Fair enough.
> >> +    // TODO: detect circular dependences
> >
> > Mmm, I think this one can be done later as an improvement.  Again,
> > not a show stopper, just something that will influence the sort order.
> Oh, ok, so at the moment, the order of execution of circular dependencies is
> undefined? It won't get stuck in a loop, or anything terrible?

The dependence propagation step will perform a DFS on the dependence
graph.  No node (FileSpec) will be visited more than once (even with
circular dependences).  As for search order, dependences determine the
partial order of FileSpecs, so a circular dependence breaks irreflexivity
(you'd end up with a FileSpec being less than itself)...

> >> Also, dependences/dependencies: Both are valid words, but the 2nd
> >> seems (to me) more commonly used?
> >
> > Must be my compiler background...  I'll change it if it bothers
> > people.
> That would be consistent with elsewhere in setup:
>        Dependency *dp = pkg.desired->required;
> DependencyProcessor {
>  DependencyProcessor (trusts const &aTrust, int aDepth=0) : deftrust (aTrust), depth (aDepth) {}
> (DependencyProcessor &processor, packagemeta *required, packageversion const &aVersion)
> deftrust, size_t depth, PackageSpecification *spec)
>  DependencyProcessor processor (deftrust, depth);
>       changed += processOneDependency (deftrust, depth, *i) + 1;
>       changed += processOneDependency (deftrust, depth, *i) + 1;
> Max.

Funny you should mention it, the autotools stuff uses "dependence"...  But
I don't mind changing it (although I may, and probably will, slip up in
regular e-mail).  A new patch is attached (along with the new ChangeLog).
2003-03-09  Igor Pechtchanski <pechtcha at cs dot nyu dot edu>

	* (RunFindVisitor::executeAll): New
	member function that propagates script dependencies,
	topologically sorts the script list, and then executes
	the scripts (via other calls).
	(RunFindVisitor::visitFile): Change to add file to list
	instead of running it immediately.
	(RunFindVisitor::files): New member variable.
	(RunFindVisitor::checkAndLogMissingDependences): New
	member function.
	(FileDesc): New class that extracts and stores
	dependencies from a script file.
	(DEPEND_STR): New #define.
	(do_postinstall): Add executeAll() call.

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

Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk!
  -- /usr/games/fortune

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

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