diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-07-29 02:18:21 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-07-29 02:18:21 +0000 |
commit | 043c1b4c682b708b7b02a17d33fb7c25ea299610 (patch) | |
tree | afa83397ae204cde5462f67195b970ec3eddbc59 /urpm | |
parent | 405b621103d674cbdfe59915b96088e42d52ccb5 (diff) | |
download | urpmi-043c1b4c682b708b7b02a17d33fb7c25ea299610.tar urpmi-043c1b4c682b708b7b02a17d33fb7c25ea299610.tar.gz urpmi-043c1b4c682b708b7b02a17d33fb7c25ea299610.tar.bz2 urpmi-043c1b4c682b708b7b02a17d33fb7c25ea299610.tar.xz urpmi-043c1b4c682b708b7b02a17d33fb7c25ea299610.zip |
Cleanups.
Diffstat (limited to 'urpm')
-rw-r--r-- | urpm/download.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/urpm/download.pm b/urpm/download.pm index d5ad44f1..539438e0 100644 --- a/urpm/download.pm +++ b/urpm/download.pm @@ -368,16 +368,16 @@ sub sync_rsync { foreach (@_) { my $count = 10; #- retry count on error (if file exists). my $basename = basename($_); - my ($file) = m!^rsync://[^\/]*::! ? (m|^rsync://(.*)|) : ($_); + my $file = m!^rsync://([^/]*::.*)! ? $1 : $_; propagate_sync_callback($options, 'start', $file); do { local $_; my $buf = ''; open my $rsync, join(" ", "/usr/bin/rsync", - ($limit_rate ? "--bwlimit=$limit_rate" : ()), + ($limit_rate ? "--bwlimit=$limit_rate" : @{[]}), ($options->{quiet} ? qw(-q) : qw(--progress -v)), - ($options->{compress} ? qw(-z) : ()), - ($options->{ssh} ? qw(-e ssh) : ()), + ($options->{compress} ? qw(-z) : @{[]}), + ($options->{ssh} ? qw(-e ssh) : @{[]}), qw(--partial --no-whole-file), "'$file' '$options->{dir}' |"); local $/ = \1; #- read input by only one char, this is slow but very nice (and it works!). @@ -404,7 +404,7 @@ sub sync_rsync { sub sync_ssh { -x "/usr/bin/ssh" or die N("ssh is missing\n"); - my $options =shift(@_); + my $options = shift(@_); $options->{ssh} = 1; sync_rsync($options, @_); } |