From 6ead4cd24f0834709404d36b20157f9429f632d0 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 7 Oct 2011 17:48:38 +0000 Subject: (_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 --- urpm/download.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'urpm/download.pm') 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); -- cgit v1.2.1