From e1b77dc67dc7c350c5d3e6acd451785a9c78f340 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 21 Oct 2008 16:22:38 +0000 Subject: - urpmi, gurpmi o allow "retry" on aria2 download failure --- urpm/main_loop.pm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'urpm/main_loop.pm') diff --git a/urpm/main_loop.pm b/urpm/main_loop.pm index a8d9a2e5..fdb82717 100644 --- a/urpm/main_loop.pm +++ b/urpm/main_loop.pm @@ -101,6 +101,13 @@ foreach my $set (@{$state->{transaction} || []}) { \@error_sources, quiet => $options{verbose} < 0, callback => $callbacks->{trans_log}, + ask_retry => $callbacks->{ask_retry} || sub { + my ($raw_msg, $msg) = @_; + if (my $download_errors = delete $urpm->{download_errors}) { + $raw_msg = join("\n", @$download_errors, ''); + } + $callbacks->{ask_yes_or_no}('', $raw_msg . "\n" . $msg . "\n" . N("Retry?")); + }, ); if (@error_sources) { $_->[0] = urpm::download::hide_password($_->[0]) foreach @error_sources; -- cgit v1.2.1