Remove buildtime and runtime dependency graph. It is useless on normal derivations.

This commit is contained in:
Rob Vermaas 2012-04-16 15:23:07 +02:00
parent 28b6ff3ed6
commit 334135448e
3 changed files with 2 additions and 55 deletions

View file

@ -289,36 +289,6 @@ sub contents : Chained('build') PathPart Args(1) {
}
sub runtimedeps : Chained('build') PathPart('runtime-deps') {
my ($self, $c) = @_;
my $build = $c->stash->{build};
notFound($c, "Path " . $build->outpath . " is no longer available.")
unless isValidPath($build->outpath);
$c->stash->{current_view} = 'NixDepGraph';
$c->stash->{storePaths} = [$build->outpath];
$c->res->content_type('image/png'); # !!!
}
sub buildtimedeps : Chained('build') PathPart('buildtime-deps') {
my ($self, $c) = @_;
my $build = $c->stash->{build};
notFound($c, "Path " . $build->drvpath . " is no longer available.")
unless isValidPath($build->drvpath);
$c->stash->{current_view} = 'NixDepGraph';
$c->stash->{storePaths} = [$build->drvpath];
$c->res->content_type('image/png'); # !!!
}
sub deps : Chained('build') PathPart('deps') {
my ($self, $c) = @_;

View file

@ -1,23 +0,0 @@
package Hydra::View::NixDepGraph;
use strict;
use base qw/Catalyst::View/;
use IO::Pipe;
sub process {
my ($self, $c) = @_;
$c->response->content_type('image/svg+xml');
my @storePaths = @{$c->stash->{storePaths}};
my $fh = new IO::Handle;
open $fh, "nix-store --query --graph @storePaths | dot -Tsvg:cairo -Gdpi=100 -Gsize=20,20 -Gbgcolor=transparent |";
$c->response->body($fh);
return 1;
}
1;

View file

@ -285,7 +285,7 @@
<td>
<tt>[% build.drvpath %]</tt>
[% IF drvAvailable %]
(build-time dependencies: <a href="[% c.uri_for('/build' build.id 'buildtime-deps') %]">graph</a> | <a href="[% c.uri_for('/build' build.id 'deps') %]#buildtime">list</a>)
(<a href="[% c.uri_for('/build' build.id 'deps') %]#buildtime">build-time dependencies</a>)
[% END %]
</td>
</tr>
@ -294,7 +294,7 @@
<td>
<tt>[% build.outpath %]</tt>
[% IF available %]
(runtime dependencies: <a href="[% c.uri_for('/build' build.id 'runtime-deps') %]">graph</a> | <a href="[% c.uri_for('/build' build.id 'deps') %]#runtime">list</a>)
(<a href="[% c.uri_for('/build' build.id 'deps') %]#runtime">runtime dependencies</a>)
[% END %]
</td>
</tr>