On Sun, 9 Mar 2003, Igor Pechtchanski wrote:

> 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, [EMAIL PROTECTED] 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:
> >
> > choose.cc:        Dependency *dp = pkg.desired->required;
> > package_version.cc:class DependencyProcessor {
> > package_version.cc:  DependencyProcessor (trusts const &aTrust, int aDepth=0) : 
> > deftrust (aTrust), depth (aDepth) {}
> > package_version.cc:select (DependencyProcessor &processor, packagemeta *required, 
> > packageversion const &aVersion)
> > package_version.cc:processOneDependency(trusts deftrust, size_t depth, 
> > PackageSpecification *spec)
> > package_version.cc:  DependencyProcessor processor (deftrust, depth);
> > package_version.cc:       changed += processOneDependency (deftrust, depth, *i) + 
> > 1;
> > package_version.cc:       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).
>         Igor
> ==============================================================================
> ChangeLog:
> 2003-03-09  Igor Pechtchanski <[EMAIL PROTECTED]>
>
>         * postinstall.cc (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.

Rats, I knew I'd slip up... :-(
A new ChangeLog below.
        Igor
==============================================================================
2003-03-09  Igor Pechtchanski <[EMAIL PROTECTED]>

        * postinstall.cc (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::checkAndLogMissingDependencies): New
        member function.
        (FileDesc): New class that extracts and stores
        dependencies from a script file.
        (DEPEND_STR): New #define.
        (do_postinstall): Add executeAll() call.

-- 
                                http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_                [EMAIL PROTECTED]
ZZZzz /,`.-'`'    -.  ;-;;,_            [EMAIL PROTECTED]
     |,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

Reply via email to