Created
January 14, 2020 15:36
-
-
Save jadams/83c35ee6f4301108b5ebcdc008c8105a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- /root/apt-mirror 2019-11-25 14:37:04.773325607 -0500 | |
+++ /usr/bin/apt-mirror 2019-11-25 14:17:29.947079216 -0500 | |
@@ -520,7 +520,8 @@ | |
if ( @parts == 3 ) | |
{ | |
my ( $sha1, $size, $filename ) = @parts; | |
- if ( $filename =~ m{^$component/i18n/Translation-[^./]*\.bz2$} ) | |
+ #if ( $filename =~ m{^$component/i18n/Translation-[^./]*\.bz2$} ) | |
+ if ( $filename =~ m{^$component/i18n/Translation-[^./]*\.(gz|bz2|xz)$} ) | |
{ | |
add_url_to_download( $dist_uri . $filename, $size ); | |
} | |
@@ -755,7 +756,9 @@ | |
my ( undef, undef, undef, undef, undef, undef, undef, $size ) = _stat($filename); | |
- return 1 unless ($size); | |
+ #return 1 unless ($size); | |
+ return 1 unless (defined $size); | |
+ return 1 if ($size <= 0); | |
return 0 if $size_on_server == $size; | |
return 1; | |
} | |
@@ -824,7 +827,8 @@ | |
add_url_to_download( $uri . "/" . $lines{"Filename:"}, $lines{"Size:"} ); | |
} | |
} | |
- else | |
+ #else | |
+ elsif ( exists $lines{"Files:"} ) | |
{ # Sources index | |
foreach ( split( /\n/, $lines{"Files:"} ) ) | |
{ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment