diff options
Diffstat (limited to 'urpm')
-rw-r--r-- | urpm/mirrors.pm | 8 |
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; |