summaryrefslogtreecommitdiffstats
path: root/urpm/download.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-06-18 14:11:31 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-06-18 14:11:31 +0000
commite2d226d49bb3879c813caa5eca5a028f06a2811d (patch)
treec932cc7e6fd4db37b976874c91d900b6aed55d20 /urpm/download.pm
parent9ac5875a7aea70e80c2815fa910884a7aad62fb2 (diff)
downloadurpmi-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
Diffstat (limited to 'urpm/download.pm')
-rw-r--r--urpm/download.pm8
1 files changed, 6 insertions, 2 deletions
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)) {