summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2011-12-05 00:02:18 +0000
committerThierry Vignaud <tv@mageia.org>2011-12-05 00:02:18 +0000
commit7d9774ed4242385bbd7f9631c60c838ce6f21cb1 (patch)
tree776a56df5fb94a8672cb1cfed0451d980f30b00e /urpm
parentd1213191f9beee0c14835aee80c8d3f669589250 (diff)
downloadurpmi-7d9774ed4242385bbd7f9631c60c838ce6f21cb1.tar
urpmi-7d9774ed4242385bbd7f9631c60c838ce6f21cb1.tar.gz
urpmi-7d9774ed4242385bbd7f9631c60c838ce6f21cb1.tar.bz2
urpmi-7d9774ed4242385bbd7f9631c60c838ce6f21cb1.tar.xz
urpmi-7d9774ed4242385bbd7f9631c60c838ce6f21cb1.zip
(_pick_one_) do not pick rsync medium if rsync is not installed (mga#3557)
Diffstat (limited to 'urpm')
-rw-r--r--urpm/mirrors.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/urpm/mirrors.pm b/urpm/mirrors.pm
index 3c9ebb25..221062b1 100644
--- a/urpm/mirrors.pm
+++ b/urpm/mirrors.pm
@@ -113,7 +113,13 @@ sub _pick_one_ {
$cache->{product_id_mtime} = _product_id_mtime();
}
- $cache->{chosen} = $cache->{list}[0]{url} or return;
+ if (-x '/usr/bin/rsync') {
+ $cache->{chosen} = $cache->{list}[0]{url};
+ } else {
+ my $m = find { $_->{url} !~ m!^rsync://! } @{$cache->{list}};
+ $cache->{chosen} = $m->{url};
+ }
+ $cache->{chosen} or return;
_save_cache($urpm);
}
$cache;