summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-06-28 12:35:43 +0000
committerFrancois Pons <fpons@mandriva.com>2002-06-28 12:35:43 +0000
commitab18e550dddce9519cc42bfa1c3353066fc7b7f4 (patch)
tree71917427d42d4eb3b0c8f4449eb4d467477ea6e5 /urpm.pm
parentb67cae4683e58ced6b28721cba36e1f1aa2b83b7 (diff)
downloadurpmi-ab18e550dddce9519cc42bfa1c3353066fc7b7f4.tar
urpmi-ab18e550dddce9519cc42bfa1c3353066fc7b7f4.tar.gz
urpmi-ab18e550dddce9519cc42bfa1c3353066fc7b7f4.tar.bz2
urpmi-ab18e550dddce9519cc42bfa1c3353066fc7b7f4.tar.xz
urpmi-ab18e550dddce9519cc42bfa1c3353066fc7b7f4.zip
3.6-4mdk
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/urpm.pm b/urpm.pm
index de096572..325ce84e 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -145,7 +145,7 @@ sub sync_webfetch {
push @{$files{$1}}, $_;
}
if ($files{ftp} || $files{http}) {
- if (-x "/usr/bin/curl") {
+ if (-x "/usr/bin/curl" && (! ref $options || $options->{prefer} ne 'wget' || ! -x "/usr/bin/wget")) {
sync_curl($options, @{$files{ftp} || []}, @{$files{http} || []});
} elsif (-x "/usr/bin/wget") {
sync_wget($options, @{$files{ftp} || []}, @{$files{http} || []});
@@ -231,7 +231,7 @@ sub sync_rsync {
-x "/usr/bin/ssh" or die _("ssh is missing\n");
my $options = shift @_;
foreach (@_) {
- my $count = 3; #- retry count on error (if file exists).
+ my $count = 10; #- retry count on error (if file exists).
my $basename = (/^.*\/([^\/]*)$/ && $1) || $_;
do {
system "/usr/bin/rsync", (ref $options && $options->{quiet} ? ("-q") : ("--progress", "-v")), "--partial", "-e", "ssh",
@@ -1665,7 +1665,7 @@ sub download_source_packages {
if ($url =~ /^(removable[^:]*|file):\/(.*)/) {
$sources{$i} = $2;
} elsif ($url =~ /^([^:]*):\/(.*\/([^\/]*))/) {
- if ($force_local) {
+ if ($force_local || $1 ne 'ftp' && $1 ne 'http') { #- only ftp and http protocol supported.
push @distant_sources, $url;
$sources{$i} = "$urpm->{cachedir}/rpms/$3";
} else {