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 13:10:41 +0300
committerBenjamin Drung <benjamin.drung@profitbricks.com>2017-05-29 13:10:41 +0300
commit31dc83f370821b320b1b40d0667cec06d6554012 (patch)
tree445fd6cc1b0138e8460e4c016bed12d48f9d4ccb
parent592dee578ce91ccfa4c25a42b709a0e8bd8b4a60 (diff)
Fix use of uninitialized value $config{"options"}
When no options are specified for a deb line in the config (e.g. no [arch=amd64] or similar), apt-mirror will print a warning: Use of uninitialized value $config{"options"} in pattern match (m//) at apt-mirror line 300, <CONFIG> line 6. fixes #68
-rwxr-xr-xapt-mirror2
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-mirror b/apt-mirror
index 7d9ff5c..ec2b09d 100755
--- a/apt-mirror
+++ b/apt-mirror
@@ -294,7 +294,7 @@ sub parse_config_line
if ( $line =~ $pattern_deb_line ) {
$config{'type'} = $+{type};
$config{'arch'} = $+{arch};
- $config{'options'} = $+{options};
+ $config{'options'} = $+{options} ? $+{options} : "";
$config{'uri'} = $+{uri};
$config{'components'} = $+{components};
if ( $config{'options'} =~ /arch=((?<arch>[\w\-]+)[,]*)/g ) {