diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-11-16 16:45:51 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-11-16 16:45:51 +0000 |
commit | a9eae95bbd960d1ffcaad9e09fc890030a5f6ec3 (patch) | |
tree | 6cde7b9a7e461cec6d2938ded9ef106caf25beb3 | |
parent | 1c35b11a74834227114a8210d261c602d2c05171 (diff) | |
download | urpmi-a9eae95bbd960d1ffcaad9e09fc890030a5f6ec3.tar urpmi-a9eae95bbd960d1ffcaad9e09fc890030a5f6ec3.tar.gz urpmi-a9eae95bbd960d1ffcaad9e09fc890030a5f6ec3.tar.bz2 urpmi-a9eae95bbd960d1ffcaad9e09fc890030a5f6ec3.tar.xz urpmi-a9eae95bbd960d1ffcaad9e09fc890030a5f6ec3.zip |
- urpmi
o fix --limit-rate (regression introduced in 4.9.12)
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | urpm/download.pm | 14 |
2 files changed, 8 insertions, 7 deletions
@@ -2,6 +2,7 @@ o with rsync, use --copy-links (to have the same behaviour as http/ftp, and so allow symlinks on the server) o fix "urpmi --install-src" (regression introduced in 4.10.9) (#35164) + o fix --limit-rate (regression introduced in 4.9.12) Version 4.10.14 - 4 October 2007, by Pascal "Pixel" Rigaux diff --git a/urpm/download.pm b/urpm/download.pm index 085d3cd7..9766ded8 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}; } |