diff options
author | Georgi Georgiev <chutz@gg3.net> | 2022-05-20 09:44:12 +0300 |
---|---|---|
committer | Georgi Georgiev <chutz@gg3.net> | 2022-05-20 09:44:12 +0300 |
commit | b140578a1da0b23119f5a75e11d21a4919924be6 (patch) | |
tree | ac091b030e5f265311f381dc020a0a90cccba8df | |
parent | 0f10eb8fa212df5b22ecb2f2cb9b07fc21b27a25 (diff) |
Follow up on Debian bug #649314
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=649314
To also quote https://github.com/Debian/apt/commit/8e3900d0d7efc11d538b944ed1d9e4e3d5286ff6
```
i18n/Index was never used outside debian - and even here it isn't used
consistently as only 'main' has such a file. As the Release file now
includes the Translation-* files we therefore drop support for
i18n/Index.
A version supporting it was never part of a debian release and still
supporting it would mean that we get 99% of the time a 404 as response
to the request anyway and confuse archive maintainers who want to
provide all files APT tries to acquire.
```
Fixes Stifler6996/apt-mirror#24
-rwxr-xr-x | apt-mirror | 75 |
1 files changed, 0 insertions, 75 deletions
@@ -641,81 +641,6 @@ foreach (@config_sources) } print "]\n\n"; -sub process_translation_index -{ - # Extract all translation files from the dists/$DIST/$COMPONENT/i18n/Index - # file. Fall back to parsing dists/$DIST/Release if i18n/Index is not found. - - my $dist_uri = remove_double_slashes(shift); - my $component = shift; - my ( $base_uri, $index_uri, $index_path, $line ) = ''; - - $base_uri = $dist_uri . $component . "/i18n/"; - $index_uri = $base_uri . "Index"; - $index_path = get_variable("skel_path") . "/" . sanitise_uri($index_uri); - - unless ( open STREAM, "<$index_path" ) - { - # No Index, nothing to process. - return; - } - - my $checksums = 0; - while ( $line = <STREAM> ) - { - chomp $line; - if ($checksums) - { - if ( $line =~ /^ +(.*)$/ ) - { - my @parts = split( / +/, $1 ); - if ( @parts == 3 ) - { - my ( $sha1, $size, $filename ) = @parts; - add_url_to_download( $base_uri . $filename, $size ); - } - else - { - warn("Malformed checksum line \"$1\" in $index_uri"); - } - } - else - { - $checksums = 0; - } - } - if ( not $checksums ) - { - if ( $line eq "SHA256:" or $line eq "SHA1:" or $line eq "MD5Sum:" ) - { - $checksums = 1; - } - } - } - - close STREAM; -} - -print "Processing translation indexes: ["; - -foreach (@config_binaries) -{ - my ( $arch, $uri, $distribution, @components ) = @{$_}; - print "T"; - if (@components) - { - $url = $uri . "/dists/" . $distribution . "/"; - - my $component; - foreach $component (@components) - { - process_translation_index( $url, $component ); - } - } -} - -print "]\n\n"; - push( @index_urls, sort keys %urls_to_download ); download_urls( "metadata", sort keys %urls_to_download ); |