--- apt-mirror 2017-05-29 00:00:00.000000000 +0300 +++ /usr/bin/apt-mirror 2023-04-18 15:48:22.967579321 +0300 @@ -520,7 +520,7 @@ if ( @parts == 3 ) { my ( $sha1, $size, $filename ) = @parts; - if ( $filename =~ m{^$component/i18n/Translation-[^./]*\.bz2$} ) + if ( $filename =~ m{^$component/i18n/Translation-[^./]*\.(bz2|xz)$} ) { add_url_to_download( $dist_uri . $filename, $size ); } @@ -824,12 +824,29 @@ add_url_to_download( $uri . "/" . $lines{"Filename:"}, $lines{"Size:"} ); } } - else + elsif ( exists $lines{"Files:"} ) { # Sources index foreach ( split( /\n/, $lines{"Files:"} ) ) { next if $_ eq ''; my @file = split; + die("apt-mirror: invalid Sources format") if @file != 3; + $skipclean{ remove_double_slashes( $path . "/" . $lines{"Directory:"} . "/" . $file[2] ) } = 1; + print FILES_ALL remove_double_slashes( $path . "/" . $lines{"Directory:"} . "/" . $file[2] ) . "\n"; + print FILES_MD5 $file[0] . " " . remove_double_slashes( $path . "/" . $lines{"Directory:"} . "/" . $file[2] ) . "\n"; + if ( need_update( $mirror . "/" . $lines{"Directory:"} . "/" . $file[2], $file[1] ) ) + { + print FILES_NEW remove_double_slashes( $uri . "/" . $lines{"Directory:"} . "/" . $file[2] ) . "\n"; + add_url_to_download( $uri . "/" . $lines{"Directory:"} . "/" . $file[2], $file[1] ); + } + } + } + elsif ( exists $lines{"Checksums-Sha256:"} ) + { # Sources index + foreach ( split( /\n/, $lines{"Checksums-Sha256:"} ) ) + { + next if $_ eq ''; + my @file = split; die("apt-mirror: invalid Sources format") if @file != 3; $skipclean{ remove_double_slashes( $path . "/" . $lines{"Directory:"} . "/" . $file[2] ) } = 1; print FILES_ALL remove_double_slashes( $path . "/" . $lines{"Directory:"} . "/" . $file[2] ) . "\n";