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:
authorBenjamin Drung <benjamin.drung@profitbricks.com>2017-05-29 14:00:13 +0300
committerBenjamin Drung <benjamin.drung@profitbricks.com>2017-05-29 14:02:33 +0300
commitc16ed08a49bd6b25aa2bec842d0c1ea8aa685e1c (patch)
treec5605b863e3fb981c40b49fac2650083b5517eb0
parent31dc83f370821b320b1b40d0667cec06d6554012 (diff)
Fix warning on repository without md5sum
A repository without MD5sum will cause warnings: Use of uninitialized value $lines{"MD5sum:"} in concatenation (.) or string at /usr/bin/apt-mirror line 787 The written MD5 file is not used by apt-mirror. Thus skip missing MD5Sum values. Example repository without MD5Sum: deb-amd64 https://packages.chef.io/stable-apt xenial main fixes #66
-rwxr-xr-xapt-mirror2
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-mirror b/apt-mirror
index ec2b09d..f05aae0 100755
--- a/apt-mirror
+++ b/apt-mirror
@@ -813,7 +813,7 @@ sub process_index
{ # Packages index
$skipclean{ remove_double_slashes( $path . "/" . $lines{"Filename:"} ) } = 1;
print FILES_ALL remove_double_slashes( $path . "/" . $lines{"Filename:"} ) . "\n";
- print FILES_MD5 $lines{"MD5sum:"} . " " . remove_double_slashes( $path . "/" . $lines{"Filename:"} ) . "\n";
+ print FILES_MD5 $lines{"MD5sum:"} . " " . remove_double_slashes( $path . "/" . $lines{"Filename:"} ) . "\n" if defined $lines{"MD5sum:"};
if ( need_update( $mirror . "/" . $lines{"Filename:"}, $lines{"Size:"} ) )
{
print FILES_NEW remove_double_slashes( $uri . "/" . $lines{"Filename:"} ) . "\n";