diff options
author | Thierry Vignaud <tv@mageia.org> | 2011-10-07 17:48:38 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2011-10-07 17:48:38 +0000 |
commit | 6ead4cd24f0834709404d36b20157f9429f632d0 (patch) | |
tree | 657c7fb5ee08c0f612cb1a6977e4d6bdd3025306 /urpm | |
parent | ec93eb79769f836a457b0a72bde70ecc08ff5dbb (diff) | |
download | urpmi-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')
-rw-r--r-- | urpm/download.pm | 4 |
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); |