summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-09-01 12:10:12 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-09-01 12:10:12 +0000
commit6364090d0dda19e1f18f38aaed15db70e4c23419 (patch)
treecd711606e0db2cff4b8a613630e1e21f7006a6be
parent043e982c5c5246a9f9d64b398df769e0490961ab (diff)
downloadurpmi-6364090d0dda19e1f18f38aaed15db70e4c23419.tar
urpmi-6364090d0dda19e1f18f38aaed15db70e4c23419.tar.gz
urpmi-6364090d0dda19e1f18f38aaed15db70e4c23419.tar.bz2
urpmi-6364090d0dda19e1f18f38aaed15db70e4c23419.tar.xz
urpmi-6364090d0dda19e1f18f38aaed15db70e4c23419.zip
cleanup
-rw-r--r--urpm/download.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/urpm/download.pm b/urpm/download.pm
index 8086bd20..77ef36b1 100644
--- a/urpm/download.pm
+++ b/urpm/download.pm
@@ -609,7 +609,6 @@ sub sync_aria2 {
#- force download to be done in cachedir to avoid polluting cwd.
(my $cwd) = getcwd() =~ /(.*)/;
chdir $options->{dir};
- my ($buf, $_total, $file) = ('', undef, undef);
my @files = uniq(map {
my $metalinkfile = $_;
@@ -635,6 +634,8 @@ sub sync_aria2 {
my $aria2_pid = open(my $aria2, "$aria2c_command |");
+ my ($buf, $_total, $file) = ('', undef, undef);
+
local $/ = \1; #- read input by only one char, this is slow but very nice (and it works!).
local $_;