From 578e37d55ccb2ac1d131676648eb74d69c8fb78a Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 26 Oct 2009 10:46:57 +0000 Subject: [PATCH] * Only non-garbage collected builds can be added to a release. --- src/lib/Hydra/Controller/Build.pm | 4 ++++ src/root/build.tt | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/Hydra/Controller/Build.pm b/src/lib/Hydra/Controller/Build.pm index 964d9670..fc07be6f 100644 --- a/src/lib/Hydra/Controller/Build.pm +++ b/src/lib/Hydra/Controller/Build.pm @@ -372,6 +372,10 @@ sub add_to_release : Chained('build') PathPart('add-to-release') Args(0) { error($c, "This build is already a part of release `$releaseName'.") if $release->releasemembers->find({build => $build->id}); + + registerRoot $build->outpath; + + error($c, "This build is no longer available.") unless isValidPath $build->outpath; $release->releasemembers->create({build => $build->id, description => $build->description}); diff --git a/src/root/build.tt b/src/root/build.tt index 2460380c..2b315be6 100644 --- a/src/root/build.tt +++ b/src/root/build.tt @@ -206,7 +206,7 @@ -[% IF c.user_exists %] +[% IF c.user_exists && available %]

Add to release: