summaryrefslogtreecommitdiffstats
path: root/urpm/download.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-12-02 15:21:14 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-12-02 15:21:14 +0000
commit79da5f7c7fabfefd8295395f9e2c8fd57e58e43e (patch)
tree1a50296029e9378747b7f181a1c00a127f1011ac /urpm/download.pm
parentd4520fb13b45e431c7c6c38716b626534bc30bd5 (diff)
downloadurpmi-79da5f7c7fabfefd8295395f9e2c8fd57e58e43e.tar
urpmi-79da5f7c7fabfefd8295395f9e2c8fd57e58e43e.tar.gz
urpmi-79da5f7c7fabfefd8295395f9e2c8fd57e58e43e.tar.bz2
urpmi-79da5f7c7fabfefd8295395f9e2c8fd57e58e43e.tar.xz
urpmi-79da5f7c7fabfefd8295395f9e2c8fd57e58e43e.zip
Fix download with wget, broken by latest changes
Diffstat (limited to 'urpm/download.pm')
-rw-r--r--urpm/download.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/urpm/download.pm b/urpm/download.pm
index afde787e..92c35945 100644
--- a/urpm/download.pm
+++ b/urpm/download.pm
@@ -207,7 +207,7 @@ sub sync_wget {
my $cwd = getcwd();
chdir $options->{dir};
my ($buf, $total, $file) = ('', undef, undef);
- my $wget_pid = open my $wget, join(" ", map { "'$_'" }
+ my $wget_command = join(" ", map { "'$_'" }
#- construction of the wget command-line
"/usr/bin/wget",
($options->{limit_rate} ? "--limit-rate=$options->{limit_rate}" : ()),
@@ -219,11 +219,12 @@ sub sync_wget {
"--retr-symlinks",
"--no-check-certificate",
"--timeout=$CONNECT_TIMEOUT",
- "-NP",
+ "-N",
(defined $options->{'wget-options'} ? split /\s+/, $options->{'wget-options'} : ()),
- $options->{dir},
+ '-P', $options->{dir},
@_
) . " |";
+ my $wget_pid = open my $wget, $wget_command;
local $/ = \1; #- read input by only one char, this is slow but very nice (and it works!).
while (<$wget>) {
$buf .= $_;