Skip to content

Commit

Permalink
[backend] bs_dodup: support xz compressed Packages files
Browse files Browse the repository at this point in the history
  • Loading branch information
mlschroe committed Apr 3, 2020
1 parent b5ebc4a commit f8a7838
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/backend/bs_dodup
Expand Up @@ -322,12 +322,16 @@ sub dod_deb {
writestr($file, undef, '');
my $basearch = Build::Deb::basearch($doddata->{'arch'});
for my $component (@components) {
my $pfile = $component eq '.' ? 'Packages.gz' : "$component/binary-$basearch/Packages.gz";
my $pfile;
for ('Packages.xz', 'Packages.gz') {
$pfile = $component eq '.' ? $_ : "$component/binary-$basearch/$_";
last if $files{$pfile};
}
die("$pfile not in Release\n") if $doddata->{'pubkey'} && !$files{$pfile};
my $tmp = "$file.tmp";
fetch("$url$pfile", $sslfingerprint, $timeout_large, $tmp);
chkverify($tmp, $files{$pfile}) if $files{$pfile};
uncompress($tmp, "Packages.gz", $file);
uncompress($tmp, $pfile, $file);
unlink($tmp);
}
return ($newcookie, $baseurl);
Expand Down

0 comments on commit f8a7838

Please sign in to comment.