summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2004-01-30 19:16:15 +0000
committerOlivier Blin <oblin@mandriva.org>2004-01-30 19:16:15 +0000
commitb5df9cfc8172135b17fd0bf3257ab3c7fece8edb (patch)
tree7c6a46805f974bfb983c605538cf3a4c526ebd58 /urpm.pm
parentcbcf6970fd363965fbfea04f7c3f987a41244750 (diff)
downloadurpmi-b5df9cfc8172135b17fd0bf3257ab3c7fece8edb.tar
urpmi-b5df9cfc8172135b17fd0bf3257ab3c7fece8edb.tar.gz
urpmi-b5df9cfc8172135b17fd0bf3257ab3c7fece8edb.tar.bz2
urpmi-b5df9cfc8172135b17fd0bf3257ab3c7fece8edb.tar.xz
urpmi-b5df9cfc8172135b17fd0bf3257ab3c7fece8edb.zip
download resuming options
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/urpm.pm b/urpm.pm
index 7b297578..2788d9f6 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -199,6 +199,7 @@ sub sync_wget {
my ($buf, $total, $file) = ('', undef, undef);
my $wget_pid = open WGET, join(" ", map { "'$_'" } "/usr/bin/wget",
(ref($options) && $options->{limit_rate} ? "--limit-rate=$options->{limit_rate}" : ()),
+ (ref($options) && $options->{resume} ? "--continue" : ()),
(ref($options) && $options->{proxy} ? set_proxy({ type => "wget", proxy => $options->{proxy} }) : ()),
(ref($options) && $options->{callback} ? ("--progress=bar:force", "-o", "-") :
ref($options) && $options->{quiet} ? "-q" : @{[]}),
@@ -300,6 +301,7 @@ sub sync_curl {
my ($buf, $file) = ('', undef);
my $curl_pid = open CURL, join(" ", map { "'$_'" } "/usr/bin/curl",
(ref($options) && $options->{limit_rate} ? ("--limit-rate", $options->{limit_rate}) : ()),
+ (ref($options) && $options->{resume} ? ("--continue-at", "-") : ()),
(ref($options) && $options->{proxy} ? set_proxy({ type => "curl", proxy => $options->{proxy} }) : ()),
(ref($options) && $options->{quiet} && !$options->{verbose} ? "-s" : @{[]}),
"-k", `curl -h` =~ /location-trusted/ ? "--location-trusted" : @{[]},
@@ -477,7 +479,7 @@ sub read_config {
$_ eq '}' and last;
#- check for boolean variables first, and after that valued variables.
my ($no, $k, $v);
- if (($no, $k, $v) = /^(no-)?(verify-rpm|fuzzy|keep|auto|allow-(?:force|nodeps)|(?:pre|post)-clean|excludedocs|compress)(?:\s*:\s*(.*))?$/) {
+ if (($no, $k, $v) = /^(no-)?(verify-rpm|fuzzy|allow-(?:force|nodeps)|(?:pre|post)-clean|excludedocs|compress|keep|auto|resume)(?:\s*:\s*(.*))?$/) {
unless (exists($urpm->{options}{$k})) {
$urpm->{options}{$k} = $v eq '' || $v =~ /^(yes|on|1)$/i || 0;
$no and $urpm->{options}{$k} = ! $urpm->{options}{$k} || 0;
@@ -2955,6 +2957,7 @@ sub download_packages_of_distant_media {
quiet => 0,
verbose => $options{verbose},
limit_rate => $options{limit_rate},
+ resume => $options{resume},
compress => $options{compress},
callback => $options{callback},
proxy => $urpm->{proxy} },