From: Massimiliano Mirra Date: 2002-09-17T22:56:34+09:00 Subject: Re: Dependency "trees" - suggestions? On Tue, Sep 17, 2002 at 10:36:36PM +0900, Paul Brannan wrote: > On Tue, Sep 17, 2002 at 10:30:30AM +0900, Massimiliano Mirra wrote: > > Yes. This means that for each node I add, the entire graph has to be > > traversed again looking checking for cycles. > > OIC, you aren't interested in protecting against a corrupted database; > you just want to prevent the user from specifying a cyclic > dependency. Actually, the user just specifies the starting package. rpkg looks at the package names in its `Depends:' field, queries the database for them, looks in turn at the packages in their `Depends:' fields... and so on, until it gets to the `leaf' packages (those who don't depend on any). There is so much information to keep track of, that it's possible for a package's maintainer to specify a dependency that in some cases causes a cycle. That happens seldom in Debian (I've only seen it twice or thrice in more than a year, and Debian has over 7000 packages), but it's not impossible, plus we'll all be novices in distribution management. :-) Massimiliano