diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2006-01-27 15:52:11 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2006-01-27 15:52:11 +0000 |
commit | c73ea3828e8455babf7ce27a63ae7963f9e095f8 (patch) | |
tree | 1c4cc159dc4c6abac190770382107ab4131b5868 /urpm/download.pm | |
parent | edb74c933fe4c50c1b529d3bfd0a9b9e5a9611c0 (diff) | |
download | urpmi-c73ea3828e8455babf7ce27a63ae7963f9e095f8.tar urpmi-c73ea3828e8455babf7ce27a63ae7963f9e095f8.tar.gz urpmi-c73ea3828e8455babf7ce27a63ae7963f9e095f8.tar.bz2 urpmi-c73ea3828e8455babf7ce27a63ae7963f9e095f8.tar.xz urpmi-c73ea3828e8455babf7ce27a63ae7963f9e095f8.zip |
Add "B" suffix by default to the limit-rate option for curl (see bug 20859)
Diffstat (limited to 'urpm/download.pm')
-rw-r--r-- | urpm/download.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/urpm/download.pm b/urpm/download.pm index 009c2139..ff57a9d4 100644 --- a/urpm/download.pm +++ b/urpm/download.pm @@ -269,6 +269,10 @@ 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$/) { + #- use bytes by default + $options->{limit_rate} .= 'B'; + } #- force download to be done in cachedir to avoid polluting cwd, #- however for curl, this is mandatory. my $cwd = getcwd(); |