From e34d40d4f8d7040eaf9eb78145b90fb33fad50dd Mon Sep 17 00:00:00 2001 From: Nikola Knezevic Date: Fri, 5 Jun 2020 15:01:25 +0200 Subject: [PATCH] Remove dead method from Nix.pm This method has been moved to hydra-eval-jobset a long time ago. --- src/lib/Hydra/Helper/Nix.pm | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/src/lib/Hydra/Helper/Nix.pm b/src/lib/Hydra/Helper/Nix.pm index b7a9bf43..fd7a3170 100644 --- a/src/lib/Hydra/Helper/Nix.pm +++ b/src/lib/Hydra/Helper/Nix.pm @@ -93,27 +93,6 @@ sub registerRoot { } -sub attrsToSQL { - my ($attrs, $id) = @_; - my @attrs = split / /, $attrs; - - my $query = "1 = 1"; - - foreach my $attr (@attrs) { - $attr =~ /^([\w-]+)=([\w-]*)$/ or die "invalid attribute in view: $attr"; - my $name = $1; - my $value = $2; - # !!! Yes, this is horribly injection-prone... (though - # name/value are filtered above). Should use SQL::Abstract, - # but it can't deal with subqueries. At least we should use - # placeholders. - $query .= " and exists (select 1 from buildinputs where build = $id and name = '$name' and value = '$value')"; - } - - return $query; -} - - sub jobsetOverview_ { my ($c, $jobsets) = @_; return $jobsets->search({},