Skip to content

Commit

Permalink
Merge pull request #14051 from mlschroe/master
Browse files Browse the repository at this point in the history
[backend] use correct cachekey for slsa provenance files
  • Loading branch information
mlschroe committed Mar 22, 2023
2 parents c1e9539 + c5f1c11 commit 73be4fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/backend/bs_getbinariesproxy
Original file line number Diff line number Diff line change
Expand Up @@ -527,13 +527,14 @@ sub getbinaries_kiwiproduct {

# get files not in cache
if (@downloadbins) {
print "downloading: @downloadbins\n";
print "downloading: ".join(' ', map {$_->{'name'}} @downloadbins)."\n";
my $toomany;
if ($downloadsizek * 1024 * 100 > $cachesize) {
manage_cache($cachesize - $downloadsizek * 1024);
}
my %downloadbins = map {$_->{'name'} => $_} @downloadbins;
my @args;
push @args, 'view=cpio';
push @args, "noajax=1" if $cgi->{'noajax'};
push @args, "binary=$_->{'name'}" for @downloadbins;
my $res;
Expand Down
4 changes: 2 additions & 2 deletions src/backend/bs_worker
Original file line number Diff line number Diff line change
Expand Up @@ -1863,7 +1863,7 @@ sub getbinaries_kiwiproduct {
}
my @s = stat("$ddir/$filename.new.rpm");
if (@s && checkbv("$ddir/$filename.new.rpm", $bv)) {
my $cachekey = $bv->{'hdrmd5'} ? "$bv->{'hdrmd5'}$rpmhdrs_only" : $bv->{'md5sum'};
my $cachekey = $bv->{'hdrmd5'} ? "$bv->{'hdrmd5'}$rpmhdrs_only" : "$bv->{'md5sum'}.extra";
my ($cacheid) = get_cachefile($prpa, $cachekey);
$cachenew{"$ddir/$filename"} = [$cacheid, $s[7], "$ddir/$filename"];
push @done, $filename;
Expand Down Expand Up @@ -1919,7 +1919,7 @@ sub getbinaries_kiwiproduct {
# in the future.
} elsif (checkbv("$ddir/$filename.new.rpm", $bv)) {
# we got the right file, put it in the cache
my $cachekey = $bv->{'hdrmd5'} ? "$bv->{'hdrmd5'}$rpmhdrs_only" : $bv->{'md5sum'};
my $cachekey = $bv->{'hdrmd5'} ? "$bv->{'hdrmd5'}$rpmhdrs_only" : "$bv->{'md5sum'}.extra";
my ($cacheid) = get_cachefile($prpa, $cachekey);
$cachenew{"$ddir/$filename"} = [$cacheid, $s[7], "$ddir/$filename"];
} else {
Expand Down

0 comments on commit 73be4fd

Please sign in to comment.