forked from lix-project/hydra
* Clean up indentation.
This commit is contained in:
parent
7daca03e78
commit
da25c963eb
|
@ -63,6 +63,7 @@ sub attrsToSQL {
|
|||
return $query;
|
||||
}
|
||||
|
||||
|
||||
sub fetchInputPath {
|
||||
my ($db, $project, $jobset, $name, $type, $value) = @_;
|
||||
|
||||
|
@ -93,12 +94,11 @@ sub fetchInputPath {
|
|||
($cachedInput) = $db->resultset('CachedPathInputs')->search(
|
||||
{srcpath => $uri, sha256hash => $sha256});
|
||||
|
||||
# Path inputs don't have a natural notion of a "revision",
|
||||
# so we simulate it by using the timestamp that we first
|
||||
# saw this path have this SHA-256 hash. So if the
|
||||
# contents of the path changes, we get a new "revision",
|
||||
# but if it doesn't change (or changes back), we don't get
|
||||
# a new "revision".
|
||||
# Path inputs don't have a natural notion of a "revision", so
|
||||
# we simulate it by using the timestamp that we first saw this
|
||||
# path have this SHA-256 hash. So if the contents of the path
|
||||
# changes, we get a new "revision", but if it doesn't change
|
||||
# (or changes back), we don't get a new "revision".
|
||||
if (!defined $cachedInput) {
|
||||
txn_do($db, sub {
|
||||
$db->resultset('CachedPathInputs')->create(
|
||||
|
@ -126,6 +126,7 @@ sub fetchInputPath {
|
|||
};
|
||||
}
|
||||
|
||||
|
||||
sub fetchInputSVN {
|
||||
my ($db, $project, $jobset, $name, $type, $value) = @_;
|
||||
|
||||
|
@ -180,6 +181,7 @@ sub fetchInputSVN {
|
|||
};
|
||||
}
|
||||
|
||||
|
||||
sub fetchInputBuild {
|
||||
my ($db, $project, $jobset, $name, $type, $value) = @_;
|
||||
|
||||
|
@ -215,6 +217,7 @@ sub fetchInputBuild {
|
|||
};
|
||||
}
|
||||
|
||||
|
||||
sub fetchInputSystemBuild {
|
||||
my ($db, $project, $jobset, $name, $type, $value) = @_;
|
||||
|
||||
|
@ -227,9 +230,7 @@ sub fetchInputSystemBuild {
|
|||
|
||||
my @validBuilds = ();
|
||||
foreach my $build (@latestBuilds) {
|
||||
if(isValidPath($build->outpath)) {
|
||||
push(@validBuilds,$build);
|
||||
}
|
||||
push(@validBuilds, $build) if isValidPath($build->outpath);
|
||||
}
|
||||
|
||||
if (scalar(@validBuilds) == 0) {
|
||||
|
@ -238,6 +239,7 @@ sub fetchInputSystemBuild {
|
|||
}
|
||||
|
||||
my @inputs = ();
|
||||
|
||||
foreach my $prevBuild (@validBuilds) {
|
||||
my $pkgNameRE = "(?:(?:[A-Za-z0-9]|(?:-[^0-9]))+)";
|
||||
my $versionRE = "(?:[A-Za-z0-9\.\-]+)";
|
||||
|
@ -254,9 +256,11 @@ sub fetchInputSystemBuild {
|
|||
};
|
||||
push(@inputs, $input);
|
||||
}
|
||||
|
||||
return @inputs;
|
||||
}
|
||||
|
||||
|
||||
sub fetchInputGit {
|
||||
my ($db, $project, $jobset, $name, $type, $value) = @_;
|
||||
|
||||
|
@ -347,13 +351,14 @@ sub fetchInputGit {
|
|||
, sha256hash => $sha256
|
||||
, revision => $revision
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
sub fetchInputCVS {
|
||||
my ($db, $project, $jobset, $name, $type, $value) = @_;
|
||||
}
|
||||
|
||||
|
||||
sub fetchInput {
|
||||
my ($db, $project, $jobset, $name, $type, $value) = @_;
|
||||
|
||||
|
@ -453,7 +458,7 @@ sub evalJobs {
|
|||
my $validJob = 1;
|
||||
foreach my $arg (@{$job->{arg}}) {
|
||||
my $input = $inputInfo->{$arg->{name}}->[$arg->{altnr}] ;
|
||||
if($input->{type} eq "sysbuild" && ! ($input->{system} eq $job->{system}) ) {
|
||||
if ($input->{type} eq "sysbuild" && $input->{system} ne $job->{system}) {
|
||||
$validJob = 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue