diff options
Diffstat (limited to 'urpm.pm')
-rw-r--r-- | urpm.pm | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -292,14 +292,14 @@ sub sync_curl { } sub sync_rsync { -x "/usr/bin/rsync" or die _("rsync is missing\n"); - -x "/usr/bin/ssh" or die _("ssh is missing\n"); my $options = shift @_; foreach (@_) { my $count = 10; #- retry count on error (if file exists). my $basename = (/^.*\/([^\/]*)$/ && $1) || $_; do { - system "/usr/bin/rsync", (ref $options && $options->{quiet} ? ("-q") : ("--progress", "-v")), "--partial", - $_, (ref $options ? $options->{dir} : $options); + /^rsync:\/\/(.*)/ or next; + system "/usr/bin/rsync", (ref $options && $options->{quiet} ? qw(-q) : qw(--progress -v)), + qw(--partial --no-whole-file), $1, (ref $options ? $options->{dir} : $options); } while ($? != 0 && --$count > 0 && (-e (ref $options ? $options->{dir} : $options) . "/$basename")); } $? == 0 or die _("rsync failed: exited with %d or signal %d\n", $? >> 8, $? & 127); @@ -312,7 +312,7 @@ sub sync_ssh { my $count = 10; #- retry count on error (if file exists). my $basename = (/^.*\/([^\/]*)$/ && $1) || $_; do { - system "/usr/bin/rsync", (ref $options && $options->{quiet} ? ("-q") : ("--progress", "-v")), "--partial", "-e", "ssh", + system "/usr/bin/rsync", (ref $options && $options->{quiet} ? qw(-q) : qw(--progress -v)), qw(--partial -e ssh), $_, (ref $options ? $options->{dir} : $options); } while ($? != 0 && --$count > 0 && (-e (ref $options ? $options->{dir} : $options) . "/$basename")); } |