Skip to content

Commit

Permalink
[backend] support zstd compressed preinstall images
Browse files Browse the repository at this point in the history
  • Loading branch information
mlschroe authored and adrianschroeter committed Apr 25, 2022
1 parent afbd787 commit cb006c3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/backend/BSSched/BuildJob/PreInstallImage.pm
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,15 @@ sub update_preinstallimage {
$imagedata = $newimagedata;
}
my @all;
@all = grep {/(?:\.tar\.xz|\.tar\.gz|\.info)$/} grep {!/^\./} sort(ls($jobdir)) if $jobdir;
@all = grep {/(?:\.tar\.xz|\.tar\.gz|\.tar\.zst|\.info)$/} grep {!/^\./} sort(ls($jobdir)) if $jobdir;
my %all = map {$_ => 1} @all;
my @imgs = grep {s/\.info$//} @all;
for my $img (@imgs) {
my $tar;
next if (-s "$jobdir/$img.info") > 100000;
if (-f "$jobdir/$img.tar.xz") {
if (-f "$jobdir/$img.tar.zst") {
$tar = "$img.tar.zst";
} elsif (-f "$jobdir/$img.tar.xz") {
$tar = "$img.tar.xz";
} elsif (-f "$jobdir/$img.tar.gz") {
$tar = "$img.tar.gz";
Expand Down

0 comments on commit cb006c3

Please sign in to comment.