diff options
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | urpm/mirrors.pm | 8 |
2 files changed, 9 insertions, 1 deletions
@@ -1,3 +1,5 @@ +- urpmi.addmedia: + o do not pick rsync medium if rsync is not installed (mga#3557) - urpmi.update: o document that -a only works on enabled media (mga#3190) 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; |