* In job inputs of type "build", allow the project and jobset names of

the input build to be specified, as well as constraints on the
  inputs of the inputs build.  For instance, you can require that a
  build has input `system = "i686-linux"'.

  This is important when one binary build serves as an input to
  another binary build.  Obviously, we shouldn't pass a build on
  i686-linux as an input to another on i686-darwin.  Hence the
  necessity for constraint.

  The constraint are currently quite limited.  What you really want to
  say is that the "system" input of the other build has to match the
  "system" input of this build.  But those require a bit more work
  since they introduce dependencies between inputs.
This commit is contained in:
Eelco Dolstra
2009-03-20 14:50:09 +00:00
parent d1affbfe1a
commit 2755c895ff
2 changed files with 75 additions and 23 deletions

View File

@ -118,7 +118,7 @@ sub attrsToSQL {
# name/value are filtered above). Should use SQL::Abstract,
# but it can't deal with subqueries. At least we should use
# placeholders.
$query .= " and (select count(*) from buildinputs where build = $id and name = '$name' and value = '$value') = 1";
$query .= " and exists (select 1 from buildinputs where build = $id and name = '$name' and value = '$value')";
}
return $query;