summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-10-16 09:14:32 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-10-16 09:14:32 +0000
commit0bfe26fdb005576a43bccbdfb79f11ad1837f40b (patch)
tree84be94db321993139105daa03f3fbab3a3cac90e
parent9543445477fb627aea85d3ba8a2091c30505bab9 (diff)
downloadurpmi-0bfe26fdb005576a43bccbdfb79f11ad1837f40b.tar
urpmi-0bfe26fdb005576a43bccbdfb79f11ad1837f40b.tar.gz
urpmi-0bfe26fdb005576a43bccbdfb79f11ad1837f40b.tar.bz2
urpmi-0bfe26fdb005576a43bccbdfb79f11ad1837f40b.tar.xz
urpmi-0bfe26fdb005576a43bccbdfb79f11ad1837f40b.zip
- gurpmi
o display the download errors
-rw-r--r--NEWS3
-rwxr-xr-xgurpmi27
2 files changed, 9 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 24d8ac62..55c51065 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,6 @@
- gurpmi
- o display all urpmi logs
+ o display the download errors
+ o log all urpmi logs
- urpmi.addmedia
o do not allow "/" in media name (#44765)
diff --git a/gurpmi2 b/gurpmi2
index 9e6a9acd..18abe6ec 100755
--- a/gurpmi2
+++ b/gurpmi2
@@ -136,6 +136,10 @@ sub configure_urpm() {
$urpm->{error} = sub {
my ($message) = @_;
printf STDERR "%s\n", $message;
+
+ if (my $download_errors = delete $urpm->{download_errors}) {
+ $message = join("\n", @$download_errors, $message);
+ }
my $nb_lines = $message =~ tr/\n/\n/;
my $w;
if ($nb_lines > 30) {
@@ -336,6 +340,9 @@ sub do_install_3 () {
$set_progressbar->($percent / 100);
} elsif ($mode eq 'end') {
$set_progressbar->(1);
+ } elsif ($mode eq 'error') {
+ #- error is 3rd argument, saved in $percent
+ push @{$urpm->{download_errors}}, N("...retrieving failed: %s", $percent);
}
sync();
},