From 9383132c73a926981604bda8f23f95b19d395b8b Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Mon, 26 Jan 2004 18:38:05 +0000 Subject: better error reporting for curl --- urpm.pm | 2 ++ urpmi | 3 +++ urpmi.spec | 1 + 3 files changed, 6 insertions(+) diff --git a/urpm.pm b/urpm.pm index 9220ef91..7d34fb38 100644 --- a/urpm.pm +++ b/urpm.pm @@ -313,6 +313,8 @@ sub sync_curl { propagate_sync_callback($options, 'end', $file); $file = undef; } + } elsif ($buf =~ /^curl:/) { #- probably an error reported by curl + propagate_sync_callback($options, 'error', $file, $buf); } } else { ref($options) && $options->{quiet} or print STDERR $buf; diff --git a/urpmi b/urpmi index f31279f7..c6cb6e87 100755 --- a/urpmi +++ b/urpmi @@ -614,6 +614,9 @@ foreach my $set (@{$state->{transaction} || []}) { print SAVEERR $text, " " x (79 - length($text)), "\r"; } elsif ($mode eq 'end') { print SAVEERR " " x 79, "\r"; + } elsif ($mode eq 'error') { + #- error is 3rd argument, saved in $percent + print STDERR N("...retrieving failed: %s"), $percent, "\n"; } } }, diff --git a/urpmi.spec b/urpmi.spec index d4b8f762..a94120c9 100644 --- a/urpmi.spec +++ b/urpmi.spec @@ -237,6 +237,7 @@ $urpm->update_media(nolock => 1, nopubkey => 1); %changelog * Wed Jan 21 2004 Olivier Blin 4.4.3-1mdk +- better error reporting for curl - fix urpmq -i on media with synthesis hdlist - fix --limit-rate in man pages (it's in bytes/sec) - really fix urpme --root -- cgit v1.2.1