diff --git a/src/lib/Hydra/Controller/Build.pm b/src/lib/Hydra/Controller/Build.pm index a16cea9e..bb6a47ce 100644 --- a/src/lib/Hydra/Controller/Build.pm +++ b/src/lib/Hydra/Controller/Build.pm @@ -339,27 +339,30 @@ sub getDependencyGraph { } -sub deps : Chained('build') PathPart('deps') { +sub build_deps : Chained('build') PathPart('build-deps') { my ($self, $c) = @_; - my $build = $c->stash->{build}; my $drvPath = $build->drvpath; + + error($c, "Derivation no longer available.") unless isValidPath $drvPath; + + $c->stash->{buildTimeGraph} = getDependencyGraph($self, $c, 0, {}, $drvPath); + + $c->stash->{template} = 'build-deps.tt'; +} + + +sub runtime_deps : Chained('build') PathPart('runtime-deps') { + my ($self, $c) = @_; + my $build = $c->stash->{build}; my @outPaths = map { $_->path } $build->buildoutputs->all; - $c->stash->{available} = all { isValidPath($_) } @outPaths; - $c->stash->{drvAvailable} = isValidPath $drvPath; + error($c, "Build outputs no longer available.") unless all { isValidPath($_) } @outPaths; - if ($c->stash->{available}) { - my $done = {}; - $c->stash->{runtimeGraph} = [ map { getDependencyGraph($self, $c, 1, $done, $_) } @outPaths ]; - } + my $done = {}; + $c->stash->{runtimeGraph} = [ map { getDependencyGraph($self, $c, 1, $done, $_) } @outPaths ]; - if ($c->stash->{drvAvailable}) { - my $done = {}; - $c->stash->{buildTimeGraph} = getDependencyGraph($self, $c, 0, $done, $drvPath); - } - - $c->stash->{template} = 'deps.tt'; + $c->stash->{template} = 'runtime-deps.tt'; } diff --git a/src/root/build-deps.tt b/src/root/build-deps.tt new file mode 100644 index 00000000..5aa4bd1e --- /dev/null +++ b/src/root/build-deps.tt @@ -0,0 +1,7 @@ +[% PROCESS deps.tt %] + +
The following builds have used this build as an input: