Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/apt-mirror/apt-mirror.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgi Georgiev <chutz@gg3.net>2022-05-20 09:44:12 +0300
committerGeorgi Georgiev <chutz@gg3.net>2022-05-20 09:47:08 +0300
commit2d917931ce545b6bdf0c28c405c66d23011b81e4 (patch)
tree895dfbfbd0aa77c08e85f57be79c38cd3c76fa8f
parent7d521b168ab34fd38fd38bbb26acad1f43e262a7 (diff)
Drop support for i18n/Index
This is a follow up of Debian bug #649314 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=649314 To also quote https://github.com/Debian/apt/commit/8e3900d0d7efc11d538b944ed1d9e4e3d5286ff6 (from 2012) ``` 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 apt-mirror/apt-mirror#154
-rwxr-xr-xapt-mirror75
1 files changed, 0 insertions, 75 deletions
diff --git a/apt-mirror b/apt-mirror
index effac7e..7e7a5e2 100755
--- a/apt-mirror
+++ b/apt-mirror
@@ -545,81 +545,6 @@ sub find_translation_files_in_release
}
}
-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" )
- {
- find_translation_files_in_release( $dist_uri, $component );
- 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( "translation", sort keys %urls_to_download );