Skip to content

Commit

Permalink
[backend] do not treat missing packages as local error
Browse files Browse the repository at this point in the history
Local errors lead to the job being returned with a "badhost" result.
We do not want that if the job just contains outdated data.
  • Loading branch information
mlschroe committed Feb 23, 2024
1 parent b423203 commit 8a14c03
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/backend/bs_worker
Original file line number Diff line number Diff line change
Expand Up @@ -1686,7 +1686,7 @@ sub getbinaries_product {
my $got = getbinaries_cache($dir, $server, $repo->{'project'}, $repo->{'repository'}, $repoarch, 1, \@kdeps, $modules);
@kdeps = grep {!$got->{$_}} @kdeps;
}
die("getbinaries_product: missing packages: @kdeps\n") if @kdeps;
die("404: getbinaries_product: missing packages: @kdeps\n") if @kdeps;

# all done for followup builds
return () if $buildinfo->{'followupfile'};
Expand Down Expand Up @@ -2524,7 +2524,7 @@ sub getbinaries_buildenv {
}
# ok, all info is collected
my @missing = grep {!@{$needed{"$_->{'name'}.$_->{'hdrmd5'}"}}} @bdeps;
die("missing packages: ".join(', ', map {+"$_->{'name'}\@$_->{'hdrmd5'}"} @missing)."\n") if @missing;
die("404 missing packages: ".join(', ', map {+"$_->{'name'}\@$_->{'hdrmd5'}"} @missing)."\n") if @missing;

my @cacheold;
my @cachenew;
Expand Down Expand Up @@ -2676,7 +2676,7 @@ sub getbinaries_containers {
}, undef, @args, "binaries=$bdep->{'name'}");
die("Error\n") unless ref($res);
$res = [ grep {$_->{'name'} ne '.errors'} @$res ];
die("getbinaries: missing packages: $bdep->{'name'}\n") unless @$res == 1;
die("404 getbinaries: missing packages: $bdep->{'name'}\n") unless @$res == 1;
my $tarname = $res->[0]->{'name'};
add_slsa_materials_binary($buildinfo, "$repo->{'project'}/$repo->{'repository'}/$buildinfo->{'arch'}", $tarname, "$ddir/$tarname", 'containers') if $buildinfo->{'slsaprovenance'};
my $imagemode = getimagemode($buildinfo);
Expand Down Expand Up @@ -2749,7 +2749,7 @@ sub getbinaries_image {
}
@todo = grep {!$got->{$_}} @todo;
}
die("getbinaries: missing packages: @todo\n") if @todo;
die("404 getbinaries: missing packages: @todo\n") if @todo;
@todo = grep {$bdep_noinstall{$_} || !$bdep_notmeta{$_}} @bdep;
}

Expand Down Expand Up @@ -2798,7 +2798,7 @@ sub getbinaries_image {
}
@todo = grep {!$got->{$_}} @todo;
}
die("getbinaries: missing packages: @todo\n") if @todo;
die("404 getbinaries: missing packages: @todo\n") if @todo;

# fetch the base containers
push @meta, getbinaries_containers($buildinfo, $dir, $srcdir, $origins);
Expand Down Expand Up @@ -2910,7 +2910,7 @@ sub getbinaries {
}
@todo = grep {!$done{"$binaryprefix$_"}} @todo;
}
die("getbinaries: missing packages: @todo\n") if @todo;
die("404 getbinaries: missing packages: @todo\n") if @todo;

# now get the native packages in cross mode
@todo = map {$_->{'name'}} grep {!$_->{'sysroot'}} @bdep if $cross;
Expand Down Expand Up @@ -2943,7 +2943,7 @@ sub getbinaries {
}
@todo = grep {!$done{$_}} @todo;
}
die("getbinaries: missing native packages: @todo\n") if @todo;
die("404 getbinaries: missing native packages: @todo\n") if @todo;

# everything is downloaded, now generate meta data
my @meta;
Expand Down

0 comments on commit 8a14c03

Please sign in to comment.