diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-06-18 14:11:31 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-06-18 14:11:31 +0000 |
commit | e2d226d49bb3879c813caa5eca5a028f06a2811d (patch) | |
tree | c932cc7e6fd4db37b976874c91d900b6aed55d20 | |
parent | 9ac5875a7aea70e80c2815fa910884a7aad62fb2 (diff) | |
download | urpmi-e2d226d49bb3879c813caa5eca5a028f06a2811d.tar urpmi-e2d226d49bb3879c813caa5eca5a028f06a2811d.tar.gz urpmi-e2d226d49bb3879c813caa5eca5a028f06a2811d.tar.bz2 urpmi-e2d226d49bb3879c813caa5eca5a028f06a2811d.tar.xz urpmi-e2d226d49bb3879c813caa5eca5a028f06a2811d.zip |
- all tools
o hide rsync errors by default to hide false positives,
but allow getting them with --debug
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | urpm/download.pm | 8 |
2 files changed, 9 insertions, 2 deletions
@@ -6,6 +6,9 @@ (it's useless and potentially dangerous when used with "resume") - urpmf o bug fix -m (#31452) +- all tools + o hide rsync errors by default to hide false positives, + but allow getting them with --debug Version 4.9.26 - 14 June 2007, by Pascal "Pixel" Rigaux diff --git a/urpm/download.pm b/urpm/download.pm index 18888b44..5e471eb4 100644 --- a/urpm/download.pm +++ b/urpm/download.pm @@ -468,9 +468,9 @@ sub sync_rsync { ($options->{quiet} ? qw(-q) : qw(--progress -v)), ($options->{compress} ? qw(-z) : @{[]}), ($options->{ssh} ? qq(-e $options->{ssh}) : @{[]}), - qw(--partial --no-whole-file), + qw(--partial --no-whole-file --no-motd), (defined $options->{'rsync-options'} ? split /\s+/, $options->{'rsync-options'} : ()), - "'$file' '$options->{dir}' |"); + "'$file' '$options->{dir}' 2>&1 |"); local $/ = \1; #- read input by only one char, this is slow but very nice (and it works!). local $_; while (<$rsync>) { @@ -479,9 +479,12 @@ sub sync_rsync { if ($options->{callback}) { if (my ($percent, $speed) = $buf =~ /^\s*\d+\s+(\d+)%\s+(\S+)\s+/) { propagate_sync_callback($options, 'progress', $file, $percent, undef, undef, $speed); + } else { + $options->{debug} and $options->{debug}($buf); } } else { $options->{quiet} or print STDERR $buf; + $options->{debug} and $options->{debug}($buf); } $buf = ''; } @@ -642,6 +645,7 @@ sub sync { dir => "$urpm->{cachedir}/partial", proxy => get_proxy($medium), $medium ? (media => $medium->{name}) : (), + $urpm->{debug} ? (debug => $urpm->{debug}) : (), %options, ); foreach my $cpt (qw(compress limit_rate retry wget-options curl-options rsync-options prozilla-options)) { |