summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-11-16 16:47:14 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-11-16 16:47:14 +0000
commit37d89283892a0a5eb250b21fbaebca28ba95fa94 (patch)
tree5bbf6596786ec39221bbcfba47de9fc63e737037
parent09fb251895a2edcffbc282e7b0cba4198099dca4 (diff)
downloadurpmi-37d89283892a0a5eb250b21fbaebca28ba95fa94.tar
urpmi-37d89283892a0a5eb250b21fbaebca28ba95fa94.tar.gz
urpmi-37d89283892a0a5eb250b21fbaebca28ba95fa94.tar.bz2
urpmi-37d89283892a0a5eb250b21fbaebca28ba95fa94.tar.xz
urpmi-37d89283892a0a5eb250b21fbaebca28ba95fa94.zip
- urpmi:
o fix --limit-rate (regression introduced in 4.9.12)
-rw-r--r--NEWS3
-rw-r--r--urpm/download.pm14
2 files changed, 10 insertions, 7 deletions
diff --git a/NEWS b/NEWS
index a0f173af..9ef1592f 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+- urpmi:
+ o fix --limit-rate (regression introduced in 4.9.12)
+
Version 4.10.14.1 - 15 November 2007, by Pascal "Pixel" Rigaux
- urpmi:
diff --git a/urpm/download.pm b/urpm/download.pm
index 9b2c464d..59100302 100644
--- a/urpm/download.pm
+++ b/urpm/download.pm
@@ -232,7 +232,7 @@ sub sync_wget {
my $wget_command = join(" ", map { "'$_'" }
#- construction of the wget command-line
"/usr/bin/wget",
- ($options->{limit_rate} ? "--limit-rate=$options->{limit_rate}" : ()),
+ ($options->{'limit-rate'} ? "--limit-rate=$options->{'limit-rate'}" : ()),
($options->{resume} ? "--continue" : "--force-clobber"),
($options->{proxy} ? set_proxy({ type => "wget", proxy => $options->{proxy} }) : ()),
($options->{retry} ? ('-t', $options->{retry}) : ()),
@@ -290,9 +290,9 @@ sub sync_curl {
-x "/usr/bin/curl" or die N("curl is missing\n");
my $options = shift;
$options = { dir => $options } if !ref $options;
- if (defined $options->{limit_rate} && $options->{limit_rate} =~ /\d$/) {
+ if (defined $options->{'limit-rate'} && $options->{'limit-rate'} =~ /\d$/) {
#- use bytes by default
- $options->{limit_rate} .= 'B';
+ $options->{'limit-rate'} .= 'B';
}
#- force download to be done in cachedir to avoid polluting cwd,
#- however for curl, this is mandatory.
@@ -320,7 +320,7 @@ sub sync_curl {
#- prepare to get back size and time stamp of each file.
my $cmd = join(" ", map { "'$_'" } "/usr/bin/curl",
"-q", # don't read .curlrc; some toggle options might interfer
- ($options->{limit_rate} ? ("--limit-rate", $options->{limit_rate}) : ()),
+ ($options->{'limit-rate'} ? ("--limit-rate", $options->{'limit-rate'}) : ()),
($options->{proxy} ? set_proxy({ type => "curl", proxy => $options->{proxy} }) : ()),
($options->{retry} ? ('--retry', $options->{retry}) : ()),
"--stderr", "-", # redirect everything to stdout
@@ -380,7 +380,7 @@ sub sync_curl {
my ($buf, $file); $buf = '';
my $cmd = join(" ", map { "'$_'" } "/usr/bin/curl",
"-q", # don't read .curlrc; some toggle options might interfer
- ($options->{limit_rate} ? ("--limit-rate", $options->{limit_rate}) : ()),
+ ($options->{'limit-rate'} ? ("--limit-rate", $options->{'limit-rate'}) : ()),
($options->{resume} ? ("--continue-at", "-") : ()),
($options->{proxy} ? set_proxy({ type => "curl", proxy => $options->{proxy} }) : ()),
($options->{retry} ? ('--retry', $options->{retry}) : ()),
@@ -457,7 +457,7 @@ sub sync_rsync {
#- force download to be done in cachedir to avoid polluting cwd.
(my $cwd) = getcwd() =~ /(.*)/;
chdir($options->{dir});
- my $limit_rate = _calc_limit_rate $options->{limit_rate};
+ my $limit_rate = _calc_limit_rate($options->{'limit-rate'});
foreach (@_) {
my $count = 10; #- retry count on error (if file exists).
my $basename = basename($_);
@@ -653,7 +653,7 @@ sub sync {
$urpm->{debug} ? (debug => $urpm->{debug}) : (),
%options,
);
- foreach my $cpt (qw(compress limit_rate retry wget-options curl-options rsync-options prozilla-options)) {
+ foreach my $cpt (qw(compress limit-rate retry wget-options curl-options rsync-options prozilla-options)) {
$all_options{$cpt} = $urpm->{options}{$cpt} if defined $urpm->{options}{$cpt};
}