summaryrefslogtreecommitdiffstats
path: root/urpm/download.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2011-10-07 17:48:38 +0000
committerThierry Vignaud <tv@mageia.org>2011-10-07 17:48:38 +0000
commit6ead4cd24f0834709404d36b20157f9429f632d0 (patch)
tree657c7fb5ee08c0f612cb1a6977e4d6bdd3025306 /urpm/download.pm
parentec93eb79769f836a457b0a72bde70ecc08ff5dbb (diff)
downloadurpmi-6ead4cd24f0834709404d36b20157f9429f632d0.tar
urpmi-6ead4cd24f0834709404d36b20157f9429f632d0.tar.gz
urpmi-6ead4cd24f0834709404d36b20157f9429f632d0.tar.bz2
urpmi-6ead4cd24f0834709404d36b20157f9429f632d0.tar.xz
urpmi-6ead4cd24f0834709404d36b20157f9429f632d0.zip
(_sync_webfetch_raw) use rsync to download from rsync-mirrors (Alexander Barakin, mga#2518)
due to options->{metalink} test, we were selecting curl/aria2/... before checking for rsync protocol tested by setting 'choosen' in /var/cache/urpmi/mirrors.cache to any mirror available on rsync, for examle: rsync://ftp-stud.hs-esslingen.de/Mageia/distrib/cauldron/x86_64
Diffstat (limited to 'urpm/download.pm')
-rw-r--r--urpm/download.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/urpm/download.pm b/urpm/download.pm
index d7cb908c..bfe4139b 100644
--- a/urpm/download.pm
+++ b/urpm/download.pm
@@ -956,6 +956,8 @@ sub _sync_webfetch_raw {
my @l = map { urpm::file_from_local_url($_) } @$files;
eval { sync_file($options, @l) };
$urpm->{fatal}(10, $@) if $@;
+ } elsif ($proto eq 'rsync') {
+ sync_rsync($options, @$files);
} elsif (member($proto, 'ftp', 'http', 'https') || $options->{metalink}) {
my $preferred = preferred_downloader($urpm, $medium, \$options->{metalink});
@@ -973,8 +975,6 @@ sub _sync_webfetch_raw {
$sync->($options, splice(@l, 0, $n));
}
}
- } elsif ($proto eq 'rsync') {
- sync_rsync($options, @$files);
} elsif ($proto eq 'ssh') {
my @ssh_files = map { m!^ssh://([^/]*)(.*)! ? "$1:$2" : () } @$files;
sync_ssh($options, @ssh_files);