delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-apps/2001/11/29/06:26:03

Mailing-List: contact cygwin-apps-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-apps-owner AT sourceware DOT cygnus DOT com
List-Subscribe: <mailto:cygwin-apps-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-apps/>
List-Post: <mailto:cygwin-apps AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-apps-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/lists.html#faqs>
Delivered-To: mailing list cygwin-apps AT sources DOT redhat DOT com
Message-ID: <01f601c178c8$64784340$0200a8c0@lifelesswks>
From: "Robert Collins" <robert DOT collins AT itdomain DOT com DOT au>
To: "Charles Wilson" <cwilson AT ece DOT gatech DOT edu>
Cc: <cygwin-apps AT sources DOT redhat DOT com>
References: <009401c178b4$0d3d92b0$0200a8c0 AT lifelesswks> <3C05FB2F DOT 2050409 AT ece DOT gatech DOT edu> <01c301c178c6$308dc660$0200a8c0 AT lifelesswks> <3C061994 DOT 4020407 AT ece DOT gatech DOT edu>
Subject: Re: setup current problems
Date: Thu, 29 Nov 2001 22:24:20 +1100
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
X-OriginalArrivalTime: 29 Nov 2001 11:25:44.0749 (UTC) FILETIME=[95F135D0:01C178C8]

===
----- Original Message -----
From: "Charles Wilson" <cwilson AT ece DOT gatech DOT edu>
To: "Robert Collins" <robert DOT collins AT itdomain DOT com DOT au>
Cc: <cygwin-apps AT sources DOT redhat DOT com>
Sent: Thursday, November 29, 2001 10:18 PM
Subject: Re: setup current problems


> Robert Collins wrote:
>
> > It's actually a little harder than that. You need to either
> > a) limit the depth of recursion/stack growth
> > b) build a network of visited nodes and only recurse into unvisited
> > nodes.
> >
> > I've implemented a), which has the downside that in corner cases,
(in
> > this case, a chain 6 requires: statements long) packages may not get
> > grabbed. Mind you, this means that of those 7 packages, the user
must
> > select ONLY the first one, and no other packages can require: any
> > package further down the chain than the 2nd one. I.e. not much of an
> > issue :}.
> >
> > However b) is the proper solution IMO, but more time is needed to do
it
> > right, so I'm leaving that for another day.
>
>
> Hmmm...it seems like dependency graph traversal is a well-studied
> problem.  Perhaps there's a GPL'ed library out there we can use?
(since
> setup is independent of cygwin1.dll itself, we ARE allowed to use pure
> GPL, non-Red Hat owned code, right?)
>
> But, yah, leave it for later...(a) is good for now.

Yes we can use GPL code. And yes, graphs are a common tool.  However
we've got a real simple solution:
add_requried (packagemeta &pkg, list *foo= NULL)
{
...
if (!foo)
  foo = new list (this);
else
  if (foo->find (this))
    return 0;
  else
    foo->append (this);
...

//when recursing
add_required(recurse_too, foo);
}

It's more that the categories branch has no templates at all (which, BTW
I've started careful use of in the HEAD branch) so writing a new list is
a PITA, something I'm _very_ tired of by now.

Rob

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019