Finding dependencies
I found a discussion on how dependencies are defined (hierarchical vs flat) in the archive. Sounds like the discussion was incomplete. Regardless of which method is used is there any tool that will walk the Portfile hierarchy to list all the dependencies? port deps <project/port name> will list the dependencies for the port, but it does not list the dependencies of the dependencies. My problem is that xmlto is a dependencies to some project that I am building but I cannot get xmlto to build and would like to remove it from the port that is causing it to build, however, I cannot figure out what project that is. Michael
Michael Franz wrote:
I found a discussion on how dependencies are defined (hierarchical vs flat) in the archive. Sounds like the discussion was incomplete. Regardless of which method is used is there any tool that will walk the Portfile hierarchy to list all the dependencies?
Not that I am aware of. Some `port depgraph' feature would be cool. Rainer
Rainer, On Jan 16, 2008 2:17 AM, Rainer Müller <raimue@macports.org> wrote:
Michael Franz wrote:
I found a discussion on how dependencies are defined (hierarchical vs flat) in the archive. Sounds like the discussion was incomplete. Regardless of which method is used is there any tool that will walk the Portfile hierarchy to list all the dependencies?
Not that I am aware of. Some `port depgraph' feature would be cool.
Rainer
I was looking at the source code and it seems that their are features that does this (the packaging onces), it should just be a matter of exposing this as a standalone command. I need to read more on what is being done in TCL and what is done in C. Michael
On Jan 15, 2008, at 20:47, Michael Franz wrote:
I found a discussion on how dependencies are defined (hierarchical vs flat) in the archive. Sounds like the discussion was incomplete. Regardless of which method is used is there any tool that will walk the Portfile hierarchy to list all the dependencies?
port deps <project/port name> will list the dependencies for the port, but it does not list the dependencies of the dependencies.
My problem is that xmlto is a dependencies to some project that I am building but I cannot get xmlto to build and would like to remove it from the port that is causing it to build, however, I cannot figure out what project that is.
I wrote a PHP script which works with Graphviz to create a graph of recursive dependencies of a port. For example, here's what it does with the gimp2 port: http://www.ryandesign.com/tmp/gimp.png I haven't made it available anywhere yet, but I can send it to you if you like. Or if you tell me which port you're trying to install, I'll show you its dependency graph.
Ryan,
I wrote a PHP script which works with Graphviz to create a graph of recursive dependencies of a port. For example, here's what it does with the gimp2 port:
This is an impressive picture! Gimp has a lot of dependencies!
I haven't made it available anywhere yet, but I can send it to you if you like. Or if you tell me which port you're trying to install, I'll show you its dependency graph.
If you could send it to me I would appreciate it. The project that I am working on does not exist yet. Thanks Michael
On Jan 16, 2008, at 17:33, Michael Franz wrote:
I wrote a PHP script which works with Graphviz to create a graph of recursive dependencies of a port. For example, here's what it does with the gimp2 port:
This is an impressive picture! Gimp has a lot of dependencies!
I haven't made it available anywhere yet, but I can send it to you if you like. Or if you tell me which port you're trying to install, I'll show you its dependency graph.
If you could send it to me I would appreciate it. The project that I am working on does not exist yet.
I may as well make it available to everyone now: http://www.ryandesign.com/tmp/portviz.tar.bz2 To use this, you need a web server with support for PHP. I use PHP 5; not sure if PHP 4 would work. You also need Graphviz. You can specify at the top of graph.php where your Graphviz executably is stored. Note that it doesn't work with the MacPorts graphviz port right now; some pango error... It does work with my Graphviz 2.14.1 binaries which are available here: http://www.ryandesign.com/graphviz/ It also works with the older Pixelglow version of Graphviz: http://www.pixelglow.com/graphviz/ Note that portviz doesn't cache any information right now, and the port command takes time to return information, so it can take several seconds or even a minute or longer for large graphs to be shown.
Ryan, I may as well make it available to everyone now:
http://www.ryandesign.com/tmp/portviz.tar.bz2
To use this, you need a web server with support for PHP. I use PHP 5; not sure if PHP 4 would work. You also need Graphviz. You can specify at the top of graph.php where your Graphviz executably is stored. Note that it doesn't work with the MacPorts graphviz port right now; some pango error... It does work with my Graphviz 2.14.1 binaries which are available here:
http://www.ryandesign.com/graphviz/
It also works with the older Pixelglow version of Graphviz:
http://www.pixelglow.com/graphviz/
Note that portviz doesn't cache any information right now, and the port command takes time to return information, so it can take several seconds or even a minute or longer for large graphs to be shown.
How hard would it be to integrate this with ports? Would it just need to be converted to tcl? I think that just generating the dot file would be enough, not need to generate the graphic. Thanks Michael
On Jan 16, 2008, at 3:33 PM, Michael Franz wrote:
Ryan,
I wrote a PHP script which works with Graphviz to create a graph of recursive dependencies of a port. For example, here's what it does with the gimp2 port:
http://www.ryandesign.com/tmp/gimp.png
This is an impressive picture! Gimp has a lot of dependencies!
I haven't made it available anywhere yet, but I can send it to you if you like. Or if you tell me which port you're trying to install, I'll show you its dependency graph.
If you could send it to me I would appreciate it. The project that I am working on does not exist yet.
Hint: after installing Graphviz, do "man dot". The syntax for describing a graph is ridiculously simple. There are examples on the man page. "port deps <portname>" will get you a list of what's required to build <portname>. And if you've already built and installed <portname>, you can use "otool -L </path/to/portname>" to see what shared libraries it is using (and what directories it expects to find them in.) A while ago I had a shell script (bash, not PHP) that built a dependency graph for every Macport on my system. If you think the graph for the Gimp is immense...!
On Jan 16, 2008, at 18:55, Michael Franz wrote:
I may as well make it available to everyone now:
http://www.ryandesign.com/tmp/portviz.tar.bz2
To use this, you need a web server with support for PHP. I use PHP 5; not sure if PHP 4 would work. You also need Graphviz. You can specify at the top of graph.php where your Graphviz executably is stored. Note that it doesn't work with the MacPorts graphviz port right now; some pango error... It does work with my Graphviz 2.14.1 binaries which are available here:
http://www.ryandesign.com/graphviz/
It also works with the older Pixelglow version of Graphviz:
http://www.pixelglow.com/graphviz/
Note that portviz doesn't cache any information right now, and the port command takes time to return information, so it can take several seconds or even a minute or longer for large graphs to be shown.
How hard would it be to integrate this with ports? Would it just need to be converted to tcl? I think that just generating the dot file would be enough, not need to generate the graphic.
I've thought about integrating this into MacPorts base before. I can't speak to how hard it would be. I can say that it would be hard for me to do so. My tcl and my knowledge of MacPorts base is still insufficient for the task. So I wrote it in PHP, which I know very well.
With my current issue with perl (p5-getopt-long and perl5.8), I spent some time looking into the tcl scripts used in macports. It seems like a lot of the necessary functions are there to build a dependency graph/list. I just have to learn tcl! I did find that Eclipse has a tcl development environment, so I might be able to make some progress on this. :) On Jan 16, 2008 8:01 PM, Ryan Schmidt <ryandesign@macports.org> wrote:
On Jan 16, 2008, at 18:55, Michael Franz wrote:
I may as well make it available to everyone now:
http://www.ryandesign.com/tmp/portviz.tar.bz2
To use this, you need a web server with support for PHP. I use PHP 5; not sure if PHP 4 would work. You also need Graphviz. You can specify at the top of graph.php where your Graphviz executably is stored. Note that it doesn't work with the MacPorts graphviz port right now; some pango error... It does work with my Graphviz 2.14.1 binaries which are available here:
http://www.ryandesign.com/graphviz/
It also works with the older Pixelglow version of Graphviz:
http://www.pixelglow.com/graphviz/
Note that portviz doesn't cache any information right now, and the port command takes time to return information, so it can take several seconds or even a minute or longer for large graphs to be shown.
How hard would it be to integrate this with ports? Would it just need to be converted to tcl? I think that just generating the dot file would be enough, not need to generate the graphic.
I've thought about integrating this into MacPorts base before. I can't speak to how hard it would be. I can say that it would be hard for me to do so. My tcl and my knowledge of MacPorts base is still insufficient for the task. So I wrote it in PHP, which I know very well.
participants (4)
-
Charles Kester
-
Michael Franz
-
Rainer Müller
-
Ryan Schmidt