Re: dependency tree

2004-05-13 Thread Jeff 'japhy' Pinyan
e may be several independent trees or none at all if the >relationships are cyclic. Well, the OP said he wanted to start with a specific package, so it sounds like he knows that will be the root of the tree. In addition, I don't expect it's proper form for a dependency tre

Re: dependency tree

2004-05-13 Thread Rob Dixon
Jeff 'Japhy' Pinyan wrote: > > >my %tree = { package1 => [ package2, package3, package4 ], > > package2 => [ package7 ], > > package3 => [ package5 ], > > package4 => [ package7, package6], > > package5 => [ ], > > package6 => [ ], >

Re: dependency tree

2004-05-13 Thread Rob Dixon
Andrew Gaffney wrote: > > In a program I'm working on, I build a hash "tree" of sorts that contains > package dependencies. Each key contains an array with the first level > dependencies of the key. Each one of those dependencies have their own key with > their first level dependencies in the hash.

Re: dependency tree

2004-05-12 Thread Jeff 'japhy' Pinyan
On May 12, Andrew Gaffney said: >> This sounds like postorder tree traversal to me: > >I've seen that term before when looking into this, but I don't know what >it means. I'd suggest bookmarking the wikipedia, it has a lot of encyclopedia-style definitions (read, long texts and examples) of compu

Re: dependency tree

2004-05-12 Thread Andrew Gaffney
Jeff 'japhy' Pinyan wrote: On May 12, Andrew Gaffney said: my %tree = { package1 => [ package2, package3, package4 ], package2 => [ package7 ], package3 => [ package5 ], package4 => [ package7, package6], package5 => [ ], package6 => [ ]

dependency tree

2004-05-12 Thread Andrew Gaffney
In a program I'm working on, I build a hash "tree" of sorts that contains package dependencies. Each key contains an array with the first level dependencies of the key. Each one of those dependencies have their own key with their first level dependencies in the hash. For example: my %tree = { p

building a dependency tree

2004-05-11 Thread Andrew Gaffney
I am writing a Perl version of Gentoo Linux's Portage package management tool just for the heck of it (and I think I can do it better (yes, I am full of myself ;) )). I already have a good portion of the program done except for the main part: building the dependency tree. My progra